Last active
          August 29, 2015 14:09 
        
      - 
      
- 
        Save aaronromeo/cf0f613248cd38b3a4ed to your computer and use it in GitHub Desktop. 
    Using Mandrill headers with Django's email framework
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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