Skip to content

Using Sendgrid for Email

Sven Steinheißer edited this page Feb 22, 2017 · 1 revision

Google App Engine has an email API which supports a limited amount of emails. They also offer SendGrid service, which increases the free email limit from 100 recipients per day to 12,000 emails per month. If you would like to use Sendgrid for sending emails, follow the steps below:

  1. Starting from this doc link, sign up for SendGrid through Google App Engine.
  2. Create an API token through the SendGrid website. Be sure to enable full access to sending emails. This is the only required permission for your API token.
  3. Edit config.py to have EMAIL_BACKEND = 'sendgrid'
  4. Add the API token to your prod / development instance by creating a Secret instance with key named SENDGRID_API_KEY. This process is covered in the README section on storing AWS tokens.
  5. Add sendgrid to the requirements.txt file. It may be useful to pin it to a specific version in order to avoid problems.
  6. Use make test and make run-dev to run the tests and ensure that emails send properly on your development server. Unlike the default Google Appengine backend, emails sent from the development server will be delivered (assuming you have the API token added to the development datastore).
Clone this wiki locally