我正在使用 PHPmail()
函数:
$to = 'AAAA <postmaster@xxx.xx>';
$subject = 'BBBB';
$message = "CCCC\r\nCCCC CCCC \r CCC \n CCC \r\n CCC \n\r CCCC";
$headers = 'From: DDD<postmaster@xxx.xx>' . "\r\n";
$headers .= "Content-Type: text/html; charset=\"UTF-8\"; format=flowed \r\n";
$headers .= "Mime-Version: 1.0 \r\n";
$headers .= "Content-Transfer-Encoding: quoted-printable \r\n";
mail($to, $subject, $message, $headers);
当我收到这封电子邮件时,它看起来像这样:
CCCC CCCC CCCC CCC CCC CCC CCCC
我会期待这样的事情:
CCCC
CCCC CCCC CCC
CCC
CCC
CCCC
没有Content-Type
HTTP 标头它工作正常。如何制作新行并仍然使用我的“Content-Type”声明?