Gilang Chandrasa Thoughts, stories, and ideas

Sending Email in Django with Gmail

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 = 'gmail_account@gmail.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.

I wouldn’t recommended to use Gmail for sending email in Django. Use this at your own risk.