Sending Email in Django with Gmail20 Jul 2016
It is used to be easy to send email in Django with Gmail, you just need to put the email configuration and you’re done.
EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_PASSWORD = 'gmail_password' EMAIL_HOST_USER = 'email@example.com' EMAIL_PORT = 587 EMAIL_USE_TLS = True DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
Now, you need to do an extra work, which actually make your gmail account to be less secure.
- Allow access to your Google account https://accounts.google.com/b/0/DisplayUnlockCaptcha
- Activate less secure apps https://www.google.com/settings/security/lesssecureapps
I wouldn’t recommended to use Gmail for sending email in Django. Use this at your own risk.