2

我有很多电子邮件、gmail 和其他电子邮件,我尝试向每个电子邮件发送一封电子邮件。实际上,只有 1 封电子邮件收到该消息,而另一封电子邮件,例如 gmail,则没有。

使用 linux :该命令echo "Hi" | mail -s "test" xxxxxxxx@gmail.com工作正常。

但是使用 PHP,邮件不会发送....

我的 mail.log 中没有错误。你有什么想法吗?

谢谢 !

编辑:我在 linux 服务器上。

4

1 回答 1

1

尝试这样的事情:

$mail = new PHPMailer(); // defaults to using php "mail()"
$body = $mailBody;
$mail->SetFrom('xxxxxxxx@example.com'); 
$mail->AddAddress('yyyyy@example.com', 'Your Name');

$mail->Subject = 'The subject';
$mail->MsgHTML('The body');
$mail->Send();
于 2013-04-22T16:14:30.673 回答