PHPmailer发送到垃圾邮件 [英] PHPmailer sends to junk email

查看:296
本文介绍了PHPmailer发送到垃圾邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚更新了一个联系表单,以使用PHPMailer来阻止电子邮件被标记为垃圾邮件,但是没有运气.

I've just updated a contact form to use PHPMailer to stop emails being marked as junk, with no luck.

这是我正在使用的相当简单的设置,但它仍然会进入人们的垃圾邮件中.

It's a fairly straight forward setup I'm using but its still going into peoples junk mail.

这是我的剧本,我想知道是否有人可以告诉我出了什么问题?

Here is my script, I was wondering if anyone could tell what was wrong?

include_once('../inc/phpmailer/class.phpmailer.php');

$mail = new PHPMailer();

$name = $_POST['name'];
$email = $_POST['email'];
$body = "Name: ".$name."\r\n";
$body .= "Email: ".$email."\r\n";
$body .= "Message: ".$_POST['message'];

$mail->From       = "mailer@blah.com";
$mail->FromName   = "Contact BLah";

$mail->Subject    = "Contact From: Blah";

$mail->Body = $body;

$mail->AddAddress("john@blah.com", "john");
$mail->AddAddress("david@blah.com", "david");

if(!$mail->Send()) {
  $errorMsg .= "Error sending message, please try again later.";
} else {
  $errorMsg .= "Message Sent successfully.";
}

我认为PHPmailer通常会负责插入适当的标头?

I thought that PHPmailer normally takes care of inserting proper headers?

有什么想法吗?

添加了垃圾邮件评分

-Spam-Status:得分= 0.0测试=无版本= 3.1.7 cmae = v = 1.0 c = 1 a = 8nJEP1OIZ-IA:10 a = soyWjZv28gkhNSke5wm04A ==:17 a = fqdOs_Nl9wd82e3SDigA:9 a = l-lynuxnH-gfU2bevBoA:7 a = wPNLvfGTeEIA:10 a = nymK5Bb5l1cA:10 a = _6wjLm_vFSYA:10 xcat = Undefined/Undefined X垃圾邮件级别:*

-Spam-Status: "score=0.0 tests=none version=3.1.7 cmae=v=1.0 c=1 a=8nJEP1OIZ-IA:10 a=soyWjZv28gkhNSke5wm04A==:17 a=fqdOs_Nl9wd82e3SDigA:9 a=l-lynuxnH-gfU2bevBoA:7 a=wPNLvfGTeEIA:10 a=nymK5Bb5l1cA:10 a=_6wjLm_vFSYA:10 xcat=Undefined/Undefined" X-Spam-Level: *

我只是在与客户端不同的服务器上尝试了该脚本,所以结果相同.我是否必须通过SMTP设置进行发送才能使其不被归类为垃圾邮件?

EDIT 2: I just tried the script on a different server from the clients and it has the same result. Do I have to send through the SMTP setup for it not to be classed as spam?

推荐答案

您的邮件被标记为垃圾邮件的某些原因:

Some reasons your mail can get marked spam:

  1. 您正在发送垃圾邮件
  2. 您的IP或IP周围的IP块已被标记为一个或多个黑洞列表上的垃圾邮件源
  3. 电子邮件的内容正在触发垃圾邮件过滤器.
  4. 收件人已将您添加到其黑名单
  5. 收件人没有将您添加到他们的白名单中
  6. 您正在发送混合源邮件(发件人:xyz@example.com",但从"someotherdomain.net"发送)
  7. 服务器的SPF记录配置错误/根本没有配置
  8. 域密钥配置错误/根本没有配置

等...

PHPMailer是一个工具.考虑一下这把锤子.锤子可能使钉子弯曲了,但这仅仅是因为持枪者的瞄准不正确.

PHPMailer is a tool. Consider it a hammer. The hammer may have bent the nail, but only because the wielder didn't aim right.

解决此问题的唯一方法是检查退回邮件(如果有)以及收件人邮箱中显示的所有内容.如果他们收到了邮件,但是邮件进入了垃圾邮件文件夹,请获取邮件的副本并检查邮件头.大多数垃圾邮件过滤器会将垃圾邮件得分/原因放在那里.

The only way you'll solve this problem is by examining the bounce messages (if any), and whatever showed up in the recipient's mailbox. If they receive the mail, but it goes into a spam folder, then get a copy of the mail and examine its headers. Most spam filters will put their spam score/reasoning in there.

这篇关于PHPmailer发送到垃圾邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆