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 34732a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sparkpost/django/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ def __init__(self, message):
formatted = {
'recipients': message.to,
'from_email': message.from_email,
'subject': message.subject,
'text': message.body
'subject': message.subject
}

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 34732a1

Please sign in to comment.