Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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 = 'postmaster@mg.bottlenose.co'
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', 'noreply@bottlenose.co', ['vitor@freitas.com'])
Source by simpleisbetterthancomplex.com #
 
PREVIOUS NEXT
Tagged: #Configuring #Django #Send #Emails #mailgun
ADD COMMENT
Topic
Name
7+7 =