-
Notifications
You must be signed in to change notification settings - Fork 36
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:
- Starting from this doc link, sign up for SendGrid through Google App Engine.
- 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.
- Edit
config.py
to haveEMAIL_BACKEND = 'sendgrid'
- Add the API token to your prod / development instance by creating a
Secret
instance with key namedSENDGRID_API_KEY
. This process is covered in the README section on storing AWS tokens. - Add
sendgrid
to therequirements.txt
file. It may be useful to pin it to a specific version in order to avoid problems. - Use
make test
andmake 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).