mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
python3: smtplib's sendmail miserably crashes with encoding issue if accent in mail body
This commit is contained in:
parent
aa0d7195cf
commit
af567c6f85
2 changed files with 2 additions and 2 deletions
|
@ -499,7 +499,7 @@ Subject: %s
|
|||
import smtplib
|
||||
|
||||
smtp = smtplib.SMTP("localhost")
|
||||
smtp.sendmail(from_, [to_], message)
|
||||
smtp.sendmail(from_, [to_], message.encode('utf-8'))
|
||||
smtp.quit()
|
||||
|
||||
|
||||
|
|
|
@ -712,5 +712,5 @@ Subject: %s
|
|||
import smtplib
|
||||
|
||||
smtp = smtplib.SMTP("localhost")
|
||||
smtp.sendmail(from_, [to_], message)
|
||||
smtp.sendmail(from_, [to_], message.encode('utf-8'))
|
||||
smtp.quit()
|
||||
|
|
Loading…
Add table
Reference in a new issue