Skip to content

Commit

Permalink
Add template error reporting, template_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
kidig committed Apr 2, 2016
1 parent c9acb4b commit 6a3e6af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions django_mailjet/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def _add_mailjet_options(self, message, msg_dict):
mailjet_attrs = {
'template_id': 'Mj-TemplateID',
'template_language': 'Mj-TemplateLanguage',
'template_error_reporting': 'Mj-TemplateErrorReporting',
'template_error_deliver': 'Mj-TemplateErrorDeliver',
'campaign': 'Mj-Campaign',
'deduplicate_campaign': 'Mj-deduplicatecampaign',
'track_open': 'Mj-trackopen',
Expand All @@ -140,8 +142,8 @@ def _add_mailjet_options(self, message, msg_dict):
if hasattr(message, attr):
msg_dict[mj_attr] = getattr(message, attr)

if hasattr(message, 'custom_vars'):
msg_dict['Vars'] = message.custom_vars
if hasattr(message, 'template_vars'):
msg_dict['Vars'] = message.template_vars

def _add_alternatives(self, message, msg_dict):
for alt in message.alternatives:
Expand Down

0 comments on commit 6a3e6af

Please sign in to comment.