Prospects for marking email as spam

I know. I sound like a spammer, but these emails are completely legal email confirmations for people who have signed up for an account on this website that we developed. These emails are distributed to different mail providers (gmail, yahoo, aol, hotmail / live), but they always end up in the Outlook Junk Email folder. I tried using Zend Framework mail, PEAR Mail and phpMailer. All of these methods result in the same thing happening.

It seemed to start after Microsoft released an update for the Outlook spam filter in January of this year.

Below is the code:

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 MYH:i:s O",time()), 'To'=> ' test@example.com ' ); $params = array('host'=>'mail.example.com','auth'=>false,'localhost' => 'www.example.com','debug'=>false); $crlf = "\n"; $mime = new Mail_mime($crlf); $mime->setTXTBody("TEST"); $mime->setHTMLBody("<html>\n<body>\nTest\n</body>\n</html>"); $body = $mime->get(); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('smtp',$params); $t=$mail->send(' test@example.com ', $hdrs, $body); 

As you can see, we use PEAR Mail functionality in this test. This is the most basic test we could run, and the above email is dumped into the Outlook Junk Email folder. We have reverse DNS on the mail server, and it corresponds to the transition DNS, SPF and DKIM, and there is nothing "spam" with the above content. Can someone see something with the above code that might make Outlook mark it as unwanted? Thanks!

+4
source share
1 answer

Your delivery speed has little to do with your software and much depends on the reputation of your domain and the IP address with the recipient's mail servers. Having SPF and DKIM in place will surely help matters (and help build a reputation over time), but if emails sent from your domain / IP did or do qualify as default users (or you do other things that seem suspicious for suppliers for example, send too many letters to your domain per unit of time), no effort at your end can overcome this.

In my experience, these factors are much more likely to cause spam assignment than something esoteric about your email headers or body. Now, if you have certain popular keywords in your letter, another thing :-)

Most major providers offer whitelisted programs with different conditions. You can find out about them through Google.

+4
source

Source: https://habr.com/ru/post/1306991/


All Articles