【发布时间】:2021-04-06 19:51:37
【问题描述】:
我正在使用以下脚本向我们的网站用户发送电子邮件:
function mailerExpressBlueHost(array $mailInputs){
require_once '../../includes/phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer();
$mail->IsMail();
$mail->SetFrom('swag@sustainablewestonma.org');
$mail->addAddress($mailInputs['addAddress']); // use for production;
$mail->AddBCC("swag@sustainablewestonma.org"); // set BCC: counts as part of the 500 limit;
$mail->AddEmbeddedImage("../images/newswagimageSmall.jpg", "swag-logo");
$mail->Subject = $mailInputs['subject'] ;
$mail->Body = $mailInputs['body'];
$mail->IsHTML(true);
$mail->ContentType="text/HTML";
if(!$mail->send()) {
$msg = 'Message could not be sent.' . 'Mailer Error: ' . $mail->ErrorInfo;
}else{
$msg = 'Message has been sent';
}
$mail->ClearAddresses();
return $msg;
}
在 ms Outlook 中查看电子邮件时,电子邮件如下所示:
但在 Iphone 上查看时,它看起来像:
有没有办法隐藏或在标题中放置主题行而不是出现在正文中? (主题行是:SWAG 邮件列表确认!)
【问题讨论】: