我已经多次询问过这类问题而且我已经尝试了所有答案,但到目前为止没有运气;
问题是,当我尝试发送一封电子邮件(我正在使用Zend Mail)时,收件人名称中包含特殊字符,它会被转换为html,例如:用户名为Mateo Julián
,会被替换为Mateo Julián
我已经尝试了html_entity_decode
但没有成功,添加了UTF-8
标题和元数据但是它们也没有用。有一点需要注意的是,我只是在发送电子邮件时遇到此问题。还将UTF-8
添加到此类邮件对象中。
$mail = new Zend_Mail('UTF-8');
,它被称为
$mail->setBodyHtml($recipient_info['message'])
->setFrom($recipient_info["sender"]['email'],$recipient_info["sender"]['name'])
->addTo($recipient_info["receiver"]['email'],$blabla)// $blabla is the problem area where I send the name of recipient.
->setSubject($recipient_info['subject']);