-
Notifications
You must be signed in to change notification settings - Fork 36
Implementing a new email backend
Sven Steinheißer edited this page Feb 22, 2017
·
1 revision
Yelp Love uses a modular architecture that allows emails to be sent using several different services. Two which are currently implemented are the Google App Engine email API, as well as the SendGrid API. You may add more email backends with the following steps:
- In
logic/email.py
, implement a function which takes the argumentssender
,recipient
,subject
,body_html
,body_text
, and sends an email. See for examplesend_appengine_email()
andsend_sendgrid_email()
. - Update the
logic.email.EMAIL_BACKENDS
dict to map the name of your backend to the function you have implemented. - Set
EMAIL_BACKEND
appropriately in yourconfig.py
. - Be sure to document any additional parameters (such as API tokens) and give a brief description of how to use your email backend in the wiki.