为什么phpmailer会在远程服务器上发送带有空正文的电子邮件但在本地服务器上工作正常?
代码是一样的
$res = $db->run("SELECT * FROM email WHERE code = 'welcome'");
$m = $res[0];
$body = nl2br($m['content']);
$body = str_replace("[EMAIL]", $ld['email'], $body);
$body = str_replace("[PASSWORD]", $ld['password'], $body);
$mail = new PHPMailer();
$mail->AddReplyTo($m['from_address'], $m['from_name']);
$mail->AddAddress($ld['email'], "");
$mail->SetFrom($m['from_address'], $m['from_name']);
$mail->Subject = $m['subject'];
$mail->AltBody = strip_tags($body);
$mail->MsgHTML($body);
if ($mail->Send() === false)
{
p($mail->ErrorInfo);
}
unset($mail);