AWS, Google App Engine, SendGrid, MailChimp and whatever services that come to your mind, you might think that coding a simple python script to send emails has become a dark art. It is gotten easier actually.

So you need to send a plain, old-fashion, reliable email but don’t want to use the archaic SMTP lib because it is not how the cool kids do it these days.

You have two ways: AWS SES or SendGrid. Both will take you less than 15 minutes to set up (combined.)

SendGrid

First, go to the SendGrid signup page and create a new API KEY. Then use it in the following script (is that simple.):

AWS SES

It takes an extra step than SendGrid; first, you need to verify your domain and email address in SES. Once you do, you can use the verified email address in the following script:

Now you can enjoy the -horrible- AWS SES dashboard, and the pretty SendGrid dashboard:

AWS SES dashboard
SendGrid dashboard

There you go, welcome back to the cool kids club.

Did you like this post? Subscribe!

Powered by MailChimp