警告:电子邮件()[function.mail]:SMTP服务器响应:550
问题描述:
我使用PHP和邮件功能,但我面对这样的错误:警告:电子邮件()[function.mail]:SMTP服务器响应:550
Warning: mail() [function.mail]: SMTP server response: 550 No such user here in C:\inetpub\vhosts\saj.ir\subdomains\lms\httpdocs\registration\include.php on line 78
我的代码是:
$srting= "testing email";
ini_set("SMTP","webmail.saj.ir");
ini_set("sendmail_from","[email protected]");
$headers= 'MIME-Version: 1.0' . "\r\n";
$headers.= 'Content-type: text/html; charset=utf8' . "\r\n";
$headers .= 'From: www.saj.ir' . "\r\n";
mail("[email protected]","class list",$srting,$header);
我不知道 谢谢。
i change
webmail.saj.ir
tohttp://ns1.easysoftco.com
and now i face this message : Failed to connect to mailserver at "http://ns1.easysoftco.com" port 25, verify your "SMTP" and "smtp_port"
哦,我发现我的问题:我使用的寡妇和IIS 7.5
是有办法的邮件在IIS 7.5
答
您已经定义$headers
和你正在使用$header
$srting= "testing email";
ini_set("SMTP","http://ns1.easysoftco.com");
ini_set("sendmail_from","[email protected]");
$headers= 'MIME-Version: 1.0' . "\r\n";
$headers.= 'Content-type: text/html; charset=utf8' . "\r\n";
$headers .= 'From: www.saj.ir' . "\r\n";
mail("[email protected]","class list",$srting,$headers);
是webmail.saj.ir您可以用作中继的SMTP服务器?这是在Windows机器上运行吗? (SMTP ini设置仅适用于Windows) – 2012-04-03 07:19:07
感谢Emil,我将webmail.saj.ir更改为'http:// ns1.easysoftco.com'。 – aya 2012-04-03 07:29:22