PHP Mail错误 - 无法向SMTP服务器发送邮件。没有指定收件人。伊特。准备。在

时间:2012-03-22 16:13:59

标签: php email smtp

我正在尝试使用简单的php电子邮件

这适用于我的生产服务器。但这不适用于我的开发服务器。我无法找到缺少的服务器配置

我收到错误

Unable to send message to SMTP server. No recipients specified. ite. ready. in  "filepath" on line 17

这是什么 ite

$toemail="me@example.com";
 $subject="subject line" ;
  $content="conetent message";
$frmemail = "From:you@example.com" ;
    mail( $toemail,$subject,$content,$frmemail ) ;

任何人都可以建议缺少什么配置或php ini设置

我可以访问端口。

我在这里看到完全相同的错误

http://www.phpfreaks.com/forums/index.php?topic=134654

http://forums.zend.com/viewtopic.php?t=5151&f=77#p23409

但阻止从其他域发送电子邮件的一些安全设置是什么?

ZMAil

SMTP  localhost  
smtp_port  25  
sendmail_from  no value  

2 个答案:

答案 0 :(得分:0)

第四个参数 - 附加标题 - 是可选的。如果未设置,将使用php.ini中的sendmail_from选项。 如果您有权访问php.ini文件,请尝试将选项设置为you@example.com并从mail()函数中删除第4个参数。

答案 1 :(得分:0)

在服务器上更改这些设置似乎允许成功发送电子邮件。更改的设置为:

AUTOADD(*YES)

ALWRLY(*ALL)

允许依赖邮件是主要邮件