We are launching a new website and we are sending the registration mail to users upon registration to activate their account. While testing we observe that our mails are landing in the spam folder of Yahoo and Gmail. This mail is a HTML mail and we have followed almost all guidelines regarding font-size, color, risky words, etc. Even Non-HTML also lands in the spam folder.

We have also set our SPF record and reverse DNS correctly.

Can someone guide as to what can be wrong because of which our mail consistently lands in SPAM folder of at least Yahoo and Gmail

  • Ravi
link|improve this question
Have a look at serverfault.com/questions/41693/… – Paul Tomblin Oct 14 '09 at 16:14
feedback

migrated from stackoverflow.com Oct 14 '09 at 15:55

This question came from our site for professional and enthusiast programmers.

3 Answers

Without a sample or more details being able to give any advice will be purely speculation. I've designed websites that send out registration activation emails and have not experienced this problem, so my guess is either in the content or construct of the message but without further details I can't elaborate.

If you're sending the email as text/html are you including a text/plain portion as well?

Another possible difference between your experience and mine was that along with SPF and DNS records being setup and correct, I also had DomainKeys and DKIM signatures on my outgoing email as well for verification.

link|improve this answer
+1 for DomainKeys, Yahoo requires them – Josh Oct 15 '09 at 12:05
feedback

Thank you Mr.Jeremy Bouse, Yah. We are using text/plain as well as text/html which are separated by mimepart boundary. We got twitter activation html mail with headers. We followed the same method what twitter follows. But still our mail is marked as spam. Twitter domain have DomainKeys and DKIM signatures. But we did not use "DomainKeys and DKIM signatures".

Are DomainKey and Signature necessary??

link|improve this answer
It definitely won't hurt if DomainKeys and/or DKIM are used. Spammers don't usually bother with it so it's a good indicator that it's probably not spam so is most often accepted provided the signatures are validated. I had DomainKeys and DKIM setup through my local Postfix MTA so all email going out was signed by the appropriate key. – Jeremy Bouse Oct 15 '09 at 12:53
feedback

Hi We have set up the DKIM in our mail server using sendmail and configured our DNS record also. Still our mails are marked as spam. Also when we sent the mail from outlook the domainkey authentication is pass whereas when the mail is sent from PHP ( PEAR package MAIL ), Yahoo is marking authentication as fail

When sent via PHP, Yahoo is adding the following header Authentication-Results: mta150.mail.in.yahoo.com from=mydomain.com; domainkeys=fail (bad sig); from=mydomain.com; dkim=permerror (bad sig)

When sent from Outlook, the header is Authentication-Results: mta175.mail.in.yahoo.com from=mydomain.com; domainkeys=pass (ok); from=mydomain.com; dkim=pass (ok) which indicates that Domain Key authentication has passed

I examined the headers when sent from PHP and compared it with what Outlook is adding and did not see much difference. While sending it from PHP I am adding the headers From, To, Message-ID, Mime-Version, Date, Subject,Content-Type and Outlook is also having the same,

What else could be wrong in the mail while sending mail via PHP because of which authentication is failing

link|improve this answer
If this is your question, you can regain ownership by linking your Stack Overflow and Server Fault accounts. – ChrisF Oct 24 '09 at 10:38
feedback

Your Answer

 
or
required, but never shown