我正在尝试使用utf8格式发送php电子邮件,问题是在我所有的雅虎,gmail或公司帐户我收到电子邮件没有问题,但一些客户端使用雅虎客户端告诉我,收到这个“ “在体内,主体看起来不错,我还应该做什么?< / p>
$subject = 'Τεστ Θέμα';
$body = 'τεστ τεστ τεστ : '.$var.'. τεστ τεστ.';
$host = "1.1.1.1";
$username = "info@test.gr";
$password = "xxx";
$from = "test<info@test.gr>";
$to = "<$email>";
$headers = array ('MIME-Version' => '1.0"\r\n"',
'Content-Type' => 'text/html; charset=UTF-8"\r\n"',
'From' => $from,
'To' => $to,
'Subject' => '=?utf-8?B?'.base64_encode($subject).'?='
);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => false,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);