postfix发送电子邮件主题打破了FROM
问题描述:
I am using postfix
to send an email to the user, but the problem is it breaks the words where it finds the space.
Here is the screenshot:
postfix-send-email
<?php
$subject = "Status Of mail";
$message = "Test Email using Postfix Apache2";
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= 'From: 'The Travel Worthy' 'pathik@gmail.com"
";
$send = mail('test@yahoo.com', $subject, $message, $headers);
if($send)
{
return 1;
}
else
{
return 0;
}
?>
我正在使用 postfix code>向用户发送电子邮件,但问题是它 打破它找到空间的单词。
这是屏幕截图:
postfix-send-email p>
&lt ;?php
$ subject =“邮件状态”;
$ message =“使用Postfix Apache2测试电子邮件”;
$ headers ='MIME-Version:1.0'。 “
”;
$ headers。='Content-type:text / html; charset = iso-8859-1'。 “
”;
$ headers。='来自:'旅行值得''pathik@gmail.com“
”;
$ send = mail('test@yahoo.com',$ subject,$ message,$ headers);
if($ send)
{
返回1;
}
else
{
返回0;
}
?>&gt;
code> pre>
div>
答
Try replacing
$headers .= 'From: 'The Travel Worthy' 'pathik@gmail.com"
";
with
$headers .= "From: The Travel Worthy <pathik@gmail.com>
";