Search This Blog

Sunday, February 20, 2011

Django, Use Gmail to Send your email

Put this in your setting.py (or your local_settings.py whcih settings.py can import it)
This setup is very useful on your development machine, so that you don't need to maintain your own smtp server.

EMAIL_HOST
= 'smtp.gmail.com'
EMAIL_PORT
= 587
EMAIL_HOST_USER = 'gmail_account'
EMAIL_HOST_PASSWORD = 'gmail_password'
EMAIL_SUBJECT_PREFIX
= '[your django project]'
EMAIL_USE_TLS
= True



No comments: