我使用本教程发送邮件:
http://www.velvetblues.com/web-development-blog/avoid-spam-filters-with-php-mail-emails/
我的代码如下所示:
$headers .= "Reply-To: The Sender <sender@sender.com>\r\n";
$headers .= "Return-Path: The Sender <sender@sender.com>\r\n";
$headers .= "From: The Sender <senter@sender.com>\r\n";
$headers .= "Organization: Sender Organization\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n"
mail("recipient@recipient.com", "Message", "A simple message.", $headers);
我正在使用 localhost(MAMP PRO) 发送邮件。
但是邮件进入垃圾邮件文件夹。如何发送进入收件箱的邮件。请大家帮我解决这个问题,我花了很多时间。