使用PHP功能发送邮件时中继不允许的消息 [英] Relaying not allowed message when sending mail with PHP function

查看:206
本文介绍了使用PHP功能发送邮件时中继不允许的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用wamp服务器,并尝试发送电子邮件与PHP函数邮件('me@ISPdomain.com','我的主题','我的身体');

php.ini 中的以下设置:

I'm using wamp server and trying to send email with the PHP function mail('me@ISPdomain.com','my subject','my body'); ,
with the following settings in php.ini:

SMTP = 'ISP's SMTP server'  
smtp_port = 25 

但是我收到消息:

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Relaying not allowed. Please use SMTP Authentication.

如何解决?

推荐答案

您的ISP的邮件服务器不允许中转,这是一件好事,否则最终会移动大量垃圾邮件。

Your ISP's mail servers do not allow "relaying", which is a good thing as otherwise they would end up moving a lot of spam.

http://en.wikipedia.org/wiki/Open_mail_relay


一个开放邮件中继是一种SMTP服务器,配置方式是允许Internet上的任何人通过它发送电子邮件,而不仅仅是发送到或源自已知用户。这以前是许多邮件服务器中的默认配置;事实上,这是互联网初步建立的方式,但由于垃圾邮件发送者和蠕虫的利用,开放邮件中继已经变得不受欢迎。许多继电器被关闭,或被其他服务器放在黑名单上。

An open mail relay is an SMTP server configured in such a way that it allows anyone on the Internet to send e-mail through it, not just mail destined to or originating from known users. This used to be the default configuration in many mail servers; indeed, it was the way the Internet was initially set up, but open mail relays have become unpopular due to their exploitation by spammers and worms. Many relays were closed, or were placed on blacklists by other servers.

为了能够利用您的ISP的邮件服务器,您需要进行身份验证首先使用用户名和密码。

To be able to utilize your ISP's mail servers you need to authenticate first with a username and password.

您可以尝试一下这个php.ini行的一个黑客:

You can try a hack of that php.ini line that goes like this:

SMTP ='username:password @ ISP的SMTP服务器地址'

这不能保证工作此选项需要在邮件服务器上设置非标准修改或选项。

This is not guaranteed to work as this option requires a non-standard modification or option to be set on the mail server.

您的另一个选项是简单地运行自己的本地代理邮件服务器,无需身份验证,然后将邮件直接发送到收件人的邮件服务器,或通过经过身份验证的连接到您的邮件服务器。

Your other option is to simply run your own local proxy mail server that requires no authentication, which will then either send the mail directly to the recipient's mail server, or via an authenticated connection to your mail server.

我不知道推荐什么与WampServer一起使用,但 WampDeveloper Pro 推荐的本地邮件服务器e:

I don't know what is recommended to be used with WampServer, but with WampDeveloper Pro the recommended local mail servers are:


  1. hmailserver

  2. mailenable

  3. Smartermail

您应该看到每个功能和要求。我相信其中一个可以干扰MySQL(安装程序会尝试放置自己的副本)。

You should see the features and requirements of each one. I believe one of them can interfere with MySQL (as the installer will try to place its own copy of it).

这篇关于使用PHP功能发送邮件时中继不允许的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆