我正在使用 cakephp 2.3。为了发送电子邮件,我现在使用的是 CakeEmail,主题有一些像 É 这样的 html 符号,在发送的电子邮件中不能很好地查看。
请帮助如何解决这个问题,我已经尝试过
$email->headerCharset = "utf-8";
但它没有奏效。我尝试了足够的谷歌但失败了。
$email = new CakeEmail();
$email->from(array('test@testing.com' => 'My Email Test'));
$email->to(array('test1@testing.com'));
$email->subject('New Form É Request From User');
$email->headerCharset = "utf-8";
$email->emailFormat('html');
$body="Requested new form is attached";
$body= "New requested from URL is here ";
if ($email->send()) {
echo "email sent";
} else {
echo "email not sent";
}