【问题标题】:PHP email go to spam [duplicate]PHP电子邮件转到垃圾邮件[重复]
【发布时间】:2013-09-16 20:20:05
【问题描述】:

我用 PHP 发送电子邮件,但它已成为垃圾邮件。

代码如下:

$headers = 'From: noreply@nitrobit.net' . "\r\n" .
           'MIME-Version: 1.0' . "\r\n" .
           'Content-type: text/html; charset=utf-8' . "\r\n" .
           'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);

这是标题:

Delivered-To: superdown.me@gmail.com
Received: by 10.114.185.6 with SMTP id ey6csp45195ldc;
        Sun, 15 Sep 2013 04:01:53 -0700 (PDT)
X-Received: by 10.180.126.3 with SMTP id mu3mr9155535wib.27.1379242912725;
        Sun, 15 Sep 2013 04:01:52 -0700 (PDT)
Return-Path: <nitrobit@nitrobit.net>
Received: from ns3365488.ovh.net ([2001:41d0:a:2c2e::1])
        by mx.google.com with ESMTPS id n7si9138570wja.151.1969.12.31.16.00.00
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Sun, 15 Sep 2013 04:01:52 -0700 (PDT)
Received-SPF: softfail (google.com: domain of transitioning nitrobit@nitrobit.net does not designate 2001:41d0:a:2c2e::1 as permitted sender) client-ip=2001:41d0:a:2c2e::1;
Authentication-Results: mx.google.com;
       spf=softfail (google.com: domain of transitioning nitrobit@nitrobit.net does not designate 2001:41d0:a:2c2e::1 as permitted sender) smtp.mail=nitrobit@nitrobit.net
Received: from apache by ns3365488.ovh.net with local (Exim 4.76)
    (envelope-from <nitrobit@nitrobit.net>)
    id 1VLA5V-0002Ck-Po
    for superdown.me@gmail.com; Sun, 15 Sep 2013 13:01:57 +0200
To: superdown.me@gmail.com
Subject: NitroBit - סיסמה עבור קנייתך
X-PHP-Originating-Script: 0:ipn.php
From: NitroBit noreply@nitrobit.net
Reply-To: superdown.me@gmail.com
X-Mailer: PHP/5.3.27MIME-Version: 1.0
Content-type: text/html; charset=utf-8
Message-Id: <E1VLA5V-0002Ck-Po@ns3365488.ovh.net>
Date: Sun, 15 Sep 2013 13:01:57 +0200

我做错了什么?

谢谢,对不起我的英语

【问题讨论】:

  • 你应该使用邮件函数的第5个参数
  • 它可能会进入您的垃圾邮件文件夹,因为发送此邮件的服务器未设置为“受信任”。这并不少见。像这样从内部脚本发送的电子邮件很容易被设置为垃圾邮件。
  • Ummm... 你有没有费心看你发布的邮件的标题! Received-SPF: softfail (google.com: domain of transitioning nitrobit@nitrobit.net 不指定 2001:41d0:a:2c2e::1 作为允许的发件人) client-ip=2001:41d0:a:2c2e::1;身份验证结果:mx.google.com; spf=softfail(google.com:过渡 nitrobit@nitrobit.net 的域未将 2001:41d0:a:2c2e::1 指定为允许的发件人) smtp.mail=nitrobit@nitrobit.net

标签: php email spam


【解决方案1】:

看起来有点像这可能是问题:

softfail (google.com: domain of transitioning nitrobit@nitrobit.net does not designate 2001:41d0:a:2c2e::1 as permitted sender) client-ip=2001:41d0:a:2c2e::1;

您可能希望了解如何将您的主机 (2001:41d0:a:2c2e::1) 指定为域 @nitrobit.net 上的允许发件人

【讨论】:

  • 您需要在您的域的 DNS 系统中设置/更改SPF record
  • @Mike B:这对你来说非常道貌岸然,但在这种情况下,这并不神秘。 OP 没有为他的域正确设置 SPF。
  • @MikeB 但这是第一次发生在我身上。通常,当我编写邮件代码时,它不会进入垃圾邮件...
  • 避免垃圾邮件过滤器是一场持久战。在某种程度上,它有助于将那些真正关心不是垃圾邮件的人与其他人区分开来,这有助于减少最终用户的信息过载。您可能会不断调整邮件标题和内容。
猜你喜欢
  • 2012-07-24
  • 1970-01-01
  • 2018-04-01
  • 2012-09-13
  • 1970-01-01
  • 2018-12-29
  • 1970-01-01
  • 2011-07-12
  • 1970-01-01
相关资源
最近更新 更多