Skip to content

Commit

Permalink
only html mailgun messages
Browse files Browse the repository at this point in the history
  • Loading branch information
aldarund committed Jun 16, 2016
1 parent d580e5e commit 1ba32f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_mailgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def _send(self, email_message):
if email_message.cc:
cc_recipients = [sanitize_address(addr, email_message.encoding) for addr in email_message.cc]
post_data.append(('cc', (",".join(cc_recipients)),))
post_data.append(('text', email_message.body,))
if email_message.content_subtype == "html":
post_data.append(('html', email_message.body,))
else:
post_data.append(('text', email_message.body,))
post_data.append(('subject', email_message.subject,))
post_data.append(('from', from_email,))
# get our recipient variables if they were passed in
Expand Down

0 comments on commit 1ba32f2

Please sign in to comment.