Skip to content

Instantly share code, notes, and snippets.

@eugena
Last active December 17, 2015 12:48
Show Gist options
  • Save eugena/b5a89affc94a631f7b6d to your computer and use it in GitHub Desktop.
Save eugena/b5a89affc94a631f7b6d to your computer and use it in GitHub Desktop.
Send email via Mandrill using Django and Mandrill template (djrill is required)
from django.core.mail import EmailMessage
msg = EmailMessage(to=['[email protected]', ])
msg.template_name = 'template'
msg.global_merge_vars = {
'var1': 'value1',
'var2': 'value2',
}
return msg.send()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment