1
我在发送波斯语电子邮件的问题。在Gmail上没问题,所有的文字都显示正常。但在像雅虎,cPanel网络邮件等命令我收到未知的字符。我应该怎么做才能解决这个问题?发送电子邮件的问题,未知的字符!
这里是我的代码:
<?php
function emailHtml($from, $subject, $message, $to) {
require_once "Mail.php";
$headers = array ('MIME-Version' => "1.0", 'Content-type' => "text/html; charset=utf-8;", 'From' => $from, 'To' => $to, 'Subject' => $subject);
$m = Mail::factory('mail');
$mail = $m->send($to, $headers, $message);
if (PEAR::isError($mail)){
return 0;
}else{
return 1;
}
}
?>
我使用PEAR邮件发送电子邮件。