Skip to content

Commit

Permalink
Merge pull request #2 from anentropic/issue-18
Browse files Browse the repository at this point in the history
Add @anentropic's MIMEBase checking Fix
  • Loading branch information
rockallite committed Nov 12, 2014
2 parents 4d24153 + 01aa4ec commit 15f2007
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion envelopes/envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ def to_mime_message(self):

for part in self._parts:
type_maj, type_min = part[0].split('/')
if type_maj == 'text' and type_min in ('html', 'plain'):
if not isinstance(part[1], MIMEBase) and type_maj == 'text' and\
type_min in ('html', 'plain'):
msg.attach(MIMEText(part[1], type_min, self._charset))
else:
msg.attach(part[1])
Expand Down

0 comments on commit 15f2007

Please sign in to comment.