Skip to content

Instantly share code, notes, and snippets.

@aaronromeo
Last active August 29, 2015 14:09
Show Gist options
  • Save aaronromeo/cf0f613248cd38b3a4ed to your computer and use it in GitHub Desktop.
Save aaronromeo/cf0f613248cd38b3a4ed to your computer and use it in GitHub Desktop.
Using Mandrill headers with Django's email framework
from django.core.mail import EmailMessage
email = EmailMessage(
# subject='',
# body='',
from_email='[email protected]',
to=['[email protected]', '[email protected]'],
bcc=['[email protected]'],
headers={
'X-MC-Template': 'template-slug',
'X-MC-MergeVars': '{"companyname": "Aaron\'s little email company", "INVOICETOTAL": "$59.99"}'
}
)
email.send()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment