2

I've been reading other questions like: sending mail with php & escaping hotmails junk folder but I don't see where the problem is. I spent some hours setting up everything.

I searched for some complete headers and I'm using them. I also set up SPF. The only thing I didn't read/saw in other questions is if hotmail detects the domain name from where the mail was sent:

  • I have a subdomain to register/login and from that subdomain some mails are sent (verification/change password mails).
  • The sender email domain is not the subdomain name.
  • The link provided in the mail sends to the subdomain (where the script is executed)

So I'm not sure if that's the reason why hotmail don't "aprove" my mails...

Here is the source of the mail (hotmail):

x-store-info:4r51+eLowCe79NzwdU2kRyU+pBy2R9QCQ99fuVSCLVNK5Qy3tNqo8vMm9jiywJSb4AMHHDpThtTp0/868JYjtiuwXZKN6huGiKorTLfam2nlYixnKNQu5eplyIAwMuvqi0o7Xe5KjgM=
Authentication-Results: hotmail.com; spf=pass (sender IP is 195.154.9.53) smtp.mailfrom=accounts@corporativelines.com; dkim=none header.d=corporativelines.com; x-hmca=pass header.id=accounts@corporativelines.com
X-SID-PRA: accounts@corporativelines.com
X-AUTH-Result: PASS
X-SID-Result: PASS
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD00
X-Message-Info: 11chDOWqoTnmN+ivpBVEjsVU8moIb13En8xpAAkdU6D2Jw9iq84N9UKCWMkB8jcijAo9uBZZpNSfs4N4ZmryrVmAm+9DT92cCh1N4AGxo+UI9VDYmm7c0Ui7BmjOCJdw5s8hvwwVCQJ3zP8VMfuIxZhQ1EirTyAADSXPIzac4tMV3En7hamwIe+Ox0V9g6xITx6WyNuJQtaCfKqkehC89rqbEhbKZ45Z
Received: from sd-22000 ([195.154.9.53]) by COL004-MC5F5.hotmail.com with Microsoft SMTPSVC(7.5.7601.23008);
     Sun, 7 Jun 2015 13:29:16 -0700
Received: (qmail 1503 invoked by uid 7798); 7 Jun 2015 20:26:51 -0000
To: how2hack@hotmail.es
Subject: =?UTF-8?B?QWN0aXZhdGUgYWNjb3VudA==?=
MIME-Version: 1.0
Content-Type: text/HTML; charset="UTF-8";
Content-Transfer-Encoding: 8bit
Date: Sun, 07 Jun 2015 21:26:51 +0100
Message-ID: <143370881165cf616b9bf0356d5acc5471bf66e73f@corporativelines.com>
From: "AET LTD" <accounts@corporativelines.com>
Reply-To: "AET LTD" <accounts@corporativelines.com>
X-Mailer: PHP 5.4.41
X-Originating-IP: 195.154.9.53
Return-Path: accounts@corporativelines.com
X-OriginalArrivalTime: 07 Jun 2015 20:29:16.0804 (UTC) FILETIME=[A00F6440:01D0A160]

<html>
    <head>
        <title>Activate account</title>
    </head>
    <body>
        <p>In order to activate your account follow this link: </p>
        <a href="http://auth.corporativelines.com/activateAccount?code=e9a7fbefc95171ed153739457c4bf78d231a067f&email=how2hack@hotmail.es">Activate account</a>
    </body>
</html>

These are the headers I'm using:

$headers    = array (
    'MIME-Version: 1.0',
    'Content-Type: text/HTML; charset="UTF-8";',
    'Content-Transfer-Encoding: 8bit', // quoted-printable for compatibility
    'Date: ' . date('r', $_SERVER['REQUEST_TIME']),
    'Message-ID: <' . $_SERVER['REQUEST_TIME'] . md5($_SERVER['REQUEST_TIME']) . '@corporativelines.com>',
    'From: ' . $from,
    'Reply-To: ' . $from,
    'Return-Path: ' . $from,
    'X-Mailer: PHP ' . phpversion(),
    'X-Originating-IP: ' . $_SERVER['SERVER_ADDR']
);

So I don't why hotmail keeps pushing my mails to the junk folder... Maybe a dns problem? I'm not sure about that kind of stuff.

Edit: this question have nothing to do with: PHP mail() function cannot send to hotmail?

I (almost) already did the basic configuration to not get flagged as spam, as in other questions says, but the problem persists. So this is a unique question, not a duplicated one.

Community
  • 1
  • 1
Chazy Chaz
  • 1,781
  • 3
  • 29
  • 48
  • possible duplicate of [PHP mail() function cannot send to hotmail?](http://stackoverflow.com/questions/5797626/php-mail-function-cannot-send-to-hotmail) –  Jun 07 '15 at 21:29
  • @Dagon where did I say that I can't send mails to hotmail? So it's not a duplicate. – Chazy Chaz Jun 07 '15 at 21:39

2 Answers2

1

The most I can see as to why Hotmail would be marking your email as "spam" is that your subject line looks weird. It's not a regular-looking subject line such as "Activate account", but instead is Subject: =?UTF-8?B?QWN0aXZhdGUgYWNjb3VudA==?=. You may want to use a static subject line such as "Corporative Lines - Activate Account" and test it to see if that makes any difference.

If it were an issue with your domain name, DNS, SPF record, etc., Hotmail would likely have rejected the activation email altogether. But the email is obviously coming into Hotmail, so something about the message itself is getting it flagged as "spam".

maff1989
  • 133
  • 6
  • I'm using UTF-8 in the subject because the website supports other languages (locales) such as spanish, french, german... I changed the subject but nothing, maybe the sender name? "AET LTD" can be flagged as spam? – Chazy Chaz Jun 07 '15 at 21:48
1

There could be many reasons for labeling your emails as Junk and it could take a while until you find what exactly trigger their system.

have a look on this link with some suggestions: http://blog.iweb.com/en/2008/03/spam-filtering-how-to-make-sure-that-hotmail-and-others-dont-exclude-your-legitimate-emails/698.html

For us, what stopped labeling our emails as Junk was the Reverse DNS lookup, so i would suggest starting with that - this means that when hotmail gets an emails he runs a reverse check for the IP to see if it matches the domain it says its from and if not it can label it as Junk.

Yo can run a Reverse checkup here: http://mxtoolbox.com/ReverseLookup.aspx

Lupin
  • 1,225
  • 11
  • 17
  • Thanks for the suggestions, I'll review those steps and recheck everything is well configured. I tried the reverse and I'm seeing somethings: http://mxtoolbox.com/domain/corporativelines.com/ are those errors/warnings the reason?? If yes, I will have to contact my hosting provider, I don't have full access... – Chazy Chaz Jun 07 '15 at 22:15
  • Hi, i would consult your provider regarding these 2 issues: Blacklisted by SECTOOR ; Reverse DNS does not match SMTP Banner – Lupin Jun 08 '15 at 06:10