How to prevent email going to spam?

Nowadays, it is hard to prevent email from going to junk mail if you intend to spam. Most mail servers on the internet deploy spam detection and filtering software that use complex algorithms to detect spammers. The software can tell if you are a spammer from the content of your emails. But if you design your email sending software carefully, you can reduce the probability of your email going to junk. Here are some basic tips.

Add From:, To: Subject: Date: headers to the message. Although they are not necessary, your email is almost definitely going to spam folder without them. The Date header is often ignored but it really matters.

Don’t just create a text/html body. Otherwise, SpamAssassin will detect this as

Even you want HTML email content, you’d better create another text/plain mime part and make the email a multi-part email. For the text/html MIME part, you should enclose the html content with <html> and </html> tags. Otherwise, you will get

All these contribute the spam score.

Add SPF/DKIM /RDNS PTR record to DNS. The importance of SPF/DKIM/Reverse DNS can be seen in the following report of some spam detection software(these are the headers added to your email message by the spam detection software).

Here is a spam detection report from port25.com.(You can get the report by sending an email to check-auth@verifier.port25.com)
This message is an automatic response from Port25′s authentication verifier
service at verifier.port25.com. The service allows email senders to perform
a simple check of various sender authentication mechanisms. It is provided
free of charge, in the hope that it is useful to the email community. While
it is not officially supported, we welcome any feedback you may have at
<verifier-feedback@port25.com>.

Thank you for using the verifier,

The Port25 Solutions, Inc. team

==========================================================
Summary of Results
==========================================================
SPF check: pass
“iprev” check: pass
DKIM check: pass
SpamAssassin check: ham

Posted in tips of hosting