PHPMailer未发送正文中包含URL的电子邮件
我已经将我的Cake PHP web应用程序配置为通过PHP Mailer类发送电子邮件,并且工作得非常完美 然而,每当我形成一个新的邮件,其中包含以.net域的URL(即使不完整)形式的文本时,消息不会被传递,调试中没有可见的错误,PHP Mailer总是成功地发送消息 相关代码:PHPMailer未发送正文中包含URL的电子邮件,php,email,cakephp,phpmailer,Php,Email,Cakephp,Phpmailer,我已经将我的Cake PHP web应用程序配置为通过PHP Mailer类发送电子邮件,并且工作得非常完美 然而,每当我形成一个新的邮件,其中包含以.net域的URL(即使不完整)形式的文本时,消息不会被传递,调试中没有可见的错误,PHP Mailer总是成功地发送消息 相关代码: $textMessage = "This remains unchanged!"; $mail->Subject = "Always the same subject!"; $mail->Body
$textMessage = "This remains unchanged!";
$mail->Subject = "Always the same subject!";
$mail->Body = $htmlMessage;
$mail->AltBody = $textMessage;
if(!$mail->Send()) {
return array('type' => "error", 'message' => 'Mailer Error: ' . $mail->ErrorInfo);
} else {
return array('type' => "success", 'message' => "Message sent!");
}
发送电子邮件的$message var的工作值:
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.com\">Uncarved.com</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.anything\">Uncarved.anything</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.com\">Uncarved.net</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.net\">Uncarved.com</a>.</p>";
$htmlMessage=“从您的站点发送的消息,”;
$htmlMessage=“从您位于的站点发送的消息,”;
导致邮件已发送但未送达的值:
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.com\">Uncarved.com</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.anything\">Uncarved.anything</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.com\">Uncarved.net</a>.</p>";
$htmlMessage = "<p>Message sent from your site at <a href=\"https://www.uncarved.net\">Uncarved.com</a>.</p>";
$htmlMessage=“从您的站点发送的消息,”;
$htmlMessage=“从您位于的站点发送的消息,”;
注意:我也有邮件中包含的表单帖子的内容。如果此内容包含.net文本,则不会传递消息
我把hotmail和gmail作为收件人邮件发送,结果是一样的。我假设入站电子邮件服务器不排除内容中带有“.net”的邮件,因此我不知道问题出在哪里
如果有任何解决方案的想法,我将不胜感激 “未发送”和“未接收”之间有明显区别。设置
SMTPDebug=2
并观看SMTP对话。我确实使用了调试,SMTP连接已完全执行。我所说的“未送达”是指电子邮件未收到。无论是否收到,这两种情况下的调试日志都是相同的。然而,只有当主体中的url(部分或全部)与浏览器标记为不安全的站点相关时,才会发生这种情况。我正在调查这种可能性。对,这不是一个PHP问题。是的,这似乎是一个电子邮件问题。我将确认这是事实,并结束这一问题。谢谢你的意见!