问问题
161 次
2 回答
-1
用这个
<?php
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=iso-8859-1";
$headers[] = "From: Sender Name <sender@domain.com>";
$headers[] = "Bcc: JJ Chong <bcc@domain2.com>";
$headers[] = "Reply-To: Recipient Name <receiver@domain3.com>";
$headers[] = "Subject: {$subject}";
$headers[] = "X-Mailer: PHP/".phpversion();
mail($to, $subject, $email, implode("\r\n", $headers));
?>
于 2012-11-26T09:48:44.753 回答
-1
您可以使用以下代码删除无效的 UTF-8 字符:
$text = iconv("UTF-8","UTF-8//IGNORE",$text);
于 2012-11-26T11:10:34.307 回答