阻止西班牙语字符转换为html

时间:2017-02-11 10:04:45

标签: php email zend-framework character-encoding special-characters

我已经多次询问过这类问题而且我已经尝试了所有答案,但到目前为止没有运气;

问题是,当我尝试发送一封电子邮件(我正在使用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']);

0 个答案:

没有答案