Outlook 将电子邮件标记为垃圾邮件

2021-12-30 00:00:00 outlook php

我知道.我听起来像垃圾邮件发送者,但对于在我们开发的这个网站上注册帐户的人来说,这些电子邮件是完全合法的电子邮件确认.这些电子邮件都通过各种邮件提供商(gmail、yahoo、aol、hotmail/live),但它们总是被定向到 Outlook 垃圾邮件文件夹中.我曾尝试使用 Zend Framework 邮件、PEAR 邮件和 phpMailer.所有这些方法都会导致同样的事情发生.

I know. I sound like a spammer but these emails are completely legitimate email confirmations for people that have signed up for an account on this website we developed. These emails all make it through to various mail providers (gmail, yahoo, aol, hotmail/live) but they always get directed into the Outlook Junk Email folder. I am have tried using Zend Framework mail, PEAR Mail and phpMailer. All of those methods result in the same thing happening.

这似乎是在微软于今年 1 月发布对 Outlook 垃圾邮件过滤器的更新之后开始发生的.

This seemed to start happening after Microsoft released their update to the Outlook Junk Email filter in January of this year.

以下是有问题的代码:

include_once('Mail.php');
include_once('Mail/mime.php');
$hdrs = array(
 'From'    => "Membership <membership@example.com>",
 'Subject' => 'Test Email',
 'Reply-To'=> "membership@example.com",
 'Message-ID'=> "<" . str_pad(rand(0,12345678),8,'0',STR_PAD_LEFT) . "@mail.example.com>",
 'Date'=> date("D, j M Y H:i:s O",time()),
 'To'=> 'test@example.com'
         );
$params = array('host'=>'mail.example.com','auth'=>false,'localhost' => 'www.example.com','debug'=>false);
$crlf = "
";
$mime = new Mail_mime($crlf);

$mime->setTXTBody("TEST");
$mime->setHTMLBody("<html>
<body>
Test
</body>
</html>");

$body = $mime->get();
$hdrs = $mime->headers($hdrs);

$mail =& Mail::factory('smtp',$params);

$t=$mail->send('test@example.com', $hdrs, $body);

如您所见,我们在此测试中使用了 PEAR 邮件功能.这是我们可以运行的最基本的测试,上面生成的电子邮件被转储到 Outlook 垃圾邮件文件夹中.我们在邮件服务器上有反向 DNS,它匹配正向 DNS,设置了 SPF 和 DKIM,上面的内容没有任何垃圾邮件".任何人都可以看到上面的代码可能导致 Outlook 将其标记为垃圾的内容吗?谢谢!

As you can see we are using the PEAR Mail functionality in this test. This is the most basic test we could run and the above generated email gets dumped into the Outlook Junk Email folder. We have reverse DNS on the mail server and it matches the forward DNS, SPF and DKIM are set up and there is nothing "spammy" with the above content. Can anybody see something with the above code that could cause Outlook to mark it as Junk? Thanks!

推荐答案

您的送达率与您的软件关系不大,而与您的域和 IP 在收件人邮件主机中的声誉有很大关系.拥有 SPF 和 DKIM 肯定会有所帮助(并有助于随着时间的推移建立声誉),但是如果从您的域/IP 发送的电子邮件确实或确实被垃圾分类为用户(或者您做了其他对提供商来说似乎可疑的事情)就像单位时间内向他们的域发送太多电子邮件一样),您无论付出多少努力都无法克服这一点.

Your delivery rate has little to do with your software and a lot to do with the reputation your domain and IP has with the recipient's mail hosts. Having SPF and DKIM in place will certainly help matters (and will help build reputation over time), but if emails sent from your domain/IP did or do get classified as users by junk (or you do other things that seem fishy to the providers like sending too many emails to their domain per unit time), no amount of effort on your end can overcome that.

根据我的经验,这些因素比电子邮件标题或正文的一些深奥的东西更有可能触发垃圾邮件指定.现在,如果您的电子邮件中有某些热门关键字,那就是另一回事了 :-)

In my experience, those factors are far more likely to trigger a junk mail designation than something esoteric about your email headers or body. Now if you have certain popular keywords in your email that's another matter :-)

大多数主要提供商都提供具有不同条件的白名单程序.您可以通过 Google 了解它们.

Most of the major providers offer white list programs with varying conditions. You can find out about them via Google.

相关文章