Answers for "Configuring Django to Send Emails with mailgun"

1

Configuring Django to Send Emails with mailgun

To configure you Django Project, add the following parameters to your settings.py
EMAIL_HOST = 'smtp.mailgun.org'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'mys3cr3tp4ssw0rd'
EMAIL_USE_TLS = True


Here is a very simple snippet to send an email:
from django.core.mail import send_mail

send_mail('subject', 'body of the message', '[email protected]', ['[email protected]'])
Posted by: Guest on February-25-2022

Python Answers by Framework

Browse Popular Code Answers by Language