fix in email send error
This commit is contained in:
parent
431dc688bb
commit
5c0dd674e9
1 changed files with 1 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ def sendmail(recipients, sender='', msg='', subject='[No Subject]', txt=None, \
|
|||
email.set_text(txt)
|
||||
else:
|
||||
try:
|
||||
msg_unicode = msg
|
||||
if isinstance(msg, str):
|
||||
msg_unicode = unicode(msg, 'utf-8', 'ignore')
|
||||
email.set_text(html2text(msg_unicode))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue