handle unicode in release announcement messages
Encode the outgoing message to UTF-8 before passing it to smtplib so that the library doesn't try to encode it as ASCII. http://logs.openstack.org/f8/f8063bcfb2d07eaf8057ec901d67176ba497cfbb/release/python-neutronclient-announce-release/c92213c/console.html#_2017-07-25_11_15_03_774289 Change-Id: I9cd2d33aff8741678ed19e6def6d489ea34a9628 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
1abd80ed8f
commit
535b4d398b
|
@ -57,6 +57,6 @@ def main():
|
|||
if pw:
|
||||
server.starttls()
|
||||
server.login(user, pw)
|
||||
server.sendmail(msg['from'], tolist, msg.as_string())
|
||||
server.sendmail(msg['from'], tolist, msg.as_string().encode('utf-8'))
|
||||
finally:
|
||||
server.quit()
|
||||
|
|
Loading…
Reference in New Issue