Skip to content

Instantly share code, notes, and snippets.

@dogancankilment
Last active April 10, 2016 18:00
Show Gist options
  • Save dogancankilment/30482890cdae45b9bc03fc3bd45bb09c to your computer and use it in GitHub Desktop.
Save dogancankilment/30482890cdae45b9bc03fc3bd45bb09c to your computer and use it in GitHub Desktop.
# django.core.mail using your base settings.py at your project
# You must add in to your settings.py email smtp configuration
# you can look my mail-sender-settings.py
# https://gist.github.com/dogancankilment/2ddf7f5363733bbef471dcaf15bdfc31#file-mail-sender-settings-py
from django.core.mail import send_mail
def mail_sender():
send_mail('Subject here',
'Here is the message.',
'from@example.com',
['to@example.com'],
fail_silently=False)
if __name__ == '__main__':
mail_sender()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment