嘿伙计们,我正在尝试设置一个邮件服务器,以便我可以使用我的 php 网络服务器发送电子邮件。我想我已经设置好了,但是当我尝试发送邮件时,我收到了这个错误:
Warning: mail() [function.mail]: SMTP server response: 550 The address is not valid. in C:\wamp\www\scripts\register.php on line 57
这是我在 php.ini 中的邮件服务器配置
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = admin@custombb.no-ip.org
这是我发送邮件的代码行:
$send = mail($to, $subject, $message, $headers);
来自日志的错误:
"TCPIP" 3584 "2012-03-15 14:56:20.609" "TCPConnection - Posting AcceptEx on 0.0.0.0:25"
"DEBUG" 3584 "2012-03-15 14:56:20.609" "Creating session 10"
"SMTPD" 3584 10 "2012-03-15 14:56:20.609" "127.0.0.1" "SENT: 220 custombb.no-ip.org ESMTP"
"SMTPD" 3584 10 "2012-03-15 14:56:20.609" "127.0.0.1" "RECEIVED: HELO duncan"
"SMTPD" 3584 10 "2012-03-15 14:56:20.609" "127.0.0.1" "SENT: 250 Hello."
"SMTPD" 868 10 "2012-03-15 14:56:20.625" "127.0.0.1" "RECEIVED: MAIL FROM:<you@yourdomain>"
"SMTPD" 868 10 "2012-03-15 14:56:20.625" "127.0.0.1" "SENT: 550 The address is not valid."
"SMTPD" 3544 10 "2012-03-15 14:56:20.625" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 3544 10 "2012-03-15 14:56:20.625" "127.0.0.1" "SENT: 221 goodbye"
"DEBUG" 4080 "2012-03-15 14:56:20.625" "Closing TCP/IP socket"
"DEBUG" 4080 "2012-03-15 14:56:20.625" "Ending session 10"
这可能是什么原因造成的?什么是替代方案?谢谢。