Created
July 9, 2011 17:28
-
-
Save reidransom/1073773 to your computer and use it in GitHub Desktop.
django and gmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# settings.py | |
EMAIL_USE_TLS = True | |
EMAIL_HOST = 'smtp.gmail.com' | |
EMAIL_HOST_USER = 'youremail@gmail.com' | |
EMAIL_HOST_PASSWORD = 'yourpassword' | |
EMAIL_PORT = 587 | |
# test with | |
$ python manage.py shell | |
>>> from django.core.mail import EmailMessage | |
>>> email = EmailMessage('Hello', 'World', to=['youremail@somewhere.com']) | |
>>> email.send() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment