I am developing a course registration website in Django. New users must confirm their email address by clicking on a link emailed to them.

Unfortunately, this message is consistently ending up in people's spam folders. What steps can I take to prevent this from happening? Should I include an unsubscribe paragraph? Should I send less mass mail from my site (I occasionally send out a message to 500 emails.)?

closed as off topic by user8 Jan 18 '12 at 20:57

Questions on Software Engineering Stack Exchange are expected to relate to software engineering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Jeff Atwood has a post on this exact topic: codinghorror.com/blog/2010/04/… – ipeet Jan 18 '12 at 20:10
  • 3
    See also this post on ServerFault.SE – Matthieu Jan 18 '12 at 20:28
  • Hi David, specific implementation troubleshooting questions like this aren't on-topic here: the link Matthieu provided is probably the best information we have on Stack Exchange. – user8 Jan 18 '12 at 20:58
  • Avoid any string that looks like spam.

Most Spam checking these days is Bayesian, which means that that your message is checked using a fuzzy algorithm that tries to guess if resembles known Spam or Ham (good) messages (mainly by checking the frequency of common spam words and phrases).

  • Send individual messages to each recipient instead of copies.

It is better to send an individual message to each recipient, rather than using multiple addresses in the BCC field because many spam filters (and many ISP's) automatically flag multiple recipients as spam.

  • If possible send via your ISP's mail server rather than using a local SMTP Server.

Messages sent from a mail server running on your computer may be flagged as spam because some mail servers will try to contact the source IP of the sending server (which will fail with a local IP address).

  • Try with smaller batches of e-mails.

It would appear that some of the big mail hosts such as Hotmail will recognize when an identical message is sent to a large number of subscribers at one time so you should stagger the delivery of your messages [...] to send your messages in small batches.

  • Minimize your use of attachments.
  • Make sure the computer sending the email has a Reverse PTR record.

What's a reverse PTR record? It's something your ISP has to configure for you -- a way of verifying that the email you send from a particular IP address actually belongs to the domain it is purportedly from.

  • Configure DomainKeys Identified Mail in your DNS and code.

What's DomainKeys Identified Mail? With DKIM, you "sign" every email you send with your private key, a key only you could possibly know. And this can be verified by attempting to decrypt the email using the public key stored in your public DNS records.

  • Set up a SenderID record in your DNS.

To be honest, SenderID is a bit of a "nice to have" compared to the above two. But if you've gone this far, you might as well go the distance. SenderID, while a little antiquated and kind of.. Microsoft/Hotmail centric.. doesn't take much additional effort.

SenderID isn't complicated. It's another TXT DNS record at the root of, say, example.com, which contains a specially formatted string documenting all the allowed IP addresses that mail can be expected to come from.

Sources and additional information:

Not the answer you're looking for? Browse other questions tagged or ask your own question.