Sending E-Mail is an important part of almost every web or mobile product. And while it may seem like a trivial thing to do at first, getting it right and finding the optimal setup is often not that easy. Spam filters, bounce rates and throttling are all things we must take into account, and sooner or later they WILL fail us.
Here's a quick run-down on our current setup at Swayy. While it definitely isn't perfect, it held up pretty well so far, sending tens of thousands of emails, with a relatively high acceptance (and conversion) rate. I'll go over setting up Django with Amazon's Simple Email Service, while covering some best practices and things to avoid.
Step #1 - setting up the Domain
Before we dive into code, we first need to prepare our DNS records. There are basically two things that we need to do.
The first step is to add a DNS SPF record - a TXT record that lets other mail servers know we allow email originating from SES to use our domain name in outgoing mail.
$ dig swayy.co TXT ; <<>> DiG 9.8.3-P1 <<>> swayy.co TXT ... swayy.co. 3600 IN TXT "v ...

Hi, I'm Oz Katz