我注意到从我的服务器发送的电子邮件在其标题中有重复的“主题”标记。我正在使用htmlMimeMail5库。
以下是处理邮件的几行代码
$mail = new htmlMimeMail5();
$mail->setFrom($sender);
if ($ccRecipient) {
$mail->setCc($ccRecipient);
}
$mail->setSubject($subject);
$mail->setPriority('high');
$mail->setHtml($html, ROOT_FOLDER . '/');
$mail->setText(strip_tags($html));
if (sizeof($attachments) > 0) {
foreach($attachments as $name => $path) {
if (file_exists($path) AND !is_dir($path)) {
$mail->addAttachment(new fileAttachment($path, $name));
}
}
}
$mail->setTextCharset('utf-8');
$mail->setHTMLCharset('utf-8');
$mail->setHeadCharset('utf-8');
if($replyTo){
$mail->setHeader('Reply-To', $replyTo);
}
$sent = $mail->send(array($sendTo));
和结果
...
To: xxx@xxx.com
Subject: =?utf-8?B?WmF6bm*tZW5hbmEgdWhyY****HphIHByZWRmYWt*dXJ1?=
MIME-Version: 1.0
X-Mailer: Mailer
From: xxx <xxx@xxx.com>
Subject: some subject
...
第一个主题中有一些东西,可能是什么以及它为什么存在? (为了以防万一,我为'*'替换了几个字符)因此可以将它视为垃圾邮件吗?
由于