我使用SwiftMailer
发送电子邮件,但我有UTF-8
科目编纂的一些问题。 Swiftmailer使用QPHeaderEncoder
作为默认编码电子邮件标题,safeMap看起来像一些UTF-8
法文字符有问题。我使用的一个主题包含了trouvé(用法语发现)这个词,并且当主题到达用户时它显示出麻烦。有没有办法在SwiftMailer中更改头文件的编码?
我想使用类似于NativeQPContentEncoder
的东西,它可用作内容编码器,但对于标题,只有Base64
和Quoted Printable
编码器。
有没有办法解决这个问题,也许我做错了什么,所以我贴的代码,我在这里使用
$message = Swift_Message::newInstance()
// set encoding in 8 bit
->setEncoder(Swift_Encoding::get8BitEncoding())
// Give the message a subject
->setSubject($subject)
// Set the From address with an associative array
->setFrom(array($from => $niceFrom))
// Set the To addresses with an associative array
->setTo(array($to)) ;
我有一个消息在井号类似的问题。 – Amir