Skip to content

Commit ccccbdb

Browse files
author
Rich Leland
committed
Merge branch 'master' of https://github.com/Haos616/python-sparkpost into Haos616-master
2 parents 1fc96b0 + aec0b4f commit ccccbdb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sparkpost/django/message.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class SparkPostMessage(dict):
2222
"""
2323

2424
def __init__(self, message):
25-
2625
formatted = dict()
2726

2827
if message.to:
@@ -34,7 +33,9 @@ def __init__(self, message):
3433
if message.subject:
3534
formatted['subject'] = message.subject
3635

37-
if message.body:
36+
if message.content_subtype == 'html':
37+
formatted['html'] = message.body
38+
else:
3839
formatted['text'] = message.body
3940

4041
if message.cc:

0 commit comments

Comments
 (0)