Skip to content

Commit

Permalink
Added support content_subtype
Browse files Browse the repository at this point in the history
  • Loading branch information
haos616 committed Apr 5, 2016
1 parent 84dc850 commit 20f9964
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sparkpost/django/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ def __init__(self, message):
'recipients': message.to,
'from_email': message.from_email,
'subject': message.subject,
'text': message.body
}

if message.content_subtype == 'html':
formatted['html'] = message.body
else:
formatted['text'] = message.body

if message.cc:
formatted['cc'] = message.cc
Expand Down

0 comments on commit 20f9964

Please sign in to comment.