cakephp电子邮件html符号在主题

时间:2013-08-01 08:37:34

标签: email cakephp htmlspecialchars

我正在使用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";  
}

0 个答案:

没有答案