【发布时间】:2016-04-07 00:39:39
【问题描述】:
我已经在我的 Apache 服务器 (Ubuntu) 上安装了 sendmail
除了使用 php mail(); 时未发送电子邮件外,一切似乎都可以找到。
我在 Apache 错误日志中收到一条错误消息:
/usr/sbin/sendmail: 找不到收件人
这是我使用函数的方式:
$user_email = "myemail@gmail.com";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: ' . $user_email . "\r\n";
$headers .= 'From: Mydomain <do-not-reply@mydomain.com>' . "\r\n";
mail($user_email,"subject","message",$headers);
【问题讨论】: