我有一个网站联系表单,该表单将带有照片附件的HTML电子邮件作为电子邮件发送到Iphone邮件应用程序。我在Iphone上收到以下错误消息:
“由于格式化,无法显示此消息。请发件人使用其他格式或电子邮件程序再次发送它。multipart / mixed”。
任何人都可以帮忙吗?
$headers = "MIME-Version: 1.0\r\n";
$headers .= "From:".$from_email."\r\n";
$headers .= "From:".$from_email."\r\n";
$headers .= "Reply-To: ".$sender_email."" . "\r\n";
$headers .= "Content-Type: multipart/mixed; boundary =
$boundary\r\n\r\n";
$body = "--$boundary\r\n";
$body .= "Content-Type: text/plain; charset=ISO-8859-1\r\n";
$body .= "Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode($message_body));
$sentMail = mail($recipient_email, $subject, $body, $headers);
答案 0 :(得分:0)
更改正文内容类型:
$body .= "Content-Type: text/html;"