postfix发送电子邮件主题打破了FROM

时间:2016-09-20 05:42:44

标签: php email apache2 ubuntu-14.04 postfix

我正在使用postfix向用户发送电子邮件,但问题是它会破坏找到空间的字词。 这是截图: postfix-send-email

enter image description here 用于发送电子邮件的PHP代码:

<?php
$subject = "Status Of mail";
$message = "Test Email using Postfix Apache2";
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: 'The Travel Worthy' 'pathik@gmail.com"\r\n";
$send = mail('test@yahoo.com', $subject, $message, $headers);
if($send)
{
    return 1;
}
else
{
    return 0;
}
?>

1 个答案:

答案 0 :(得分:1)

尝试替换

$headers .= 'From: 'The Travel Worthy' 'pathik@gmail.com"\r\n";

$headers .= "From: The Travel Worthy <pathik@gmail.com>\r\n";