SMTP authentication uses bytes, not unicode, fixes #126

Encode configuration variables as ascii, ignoring non-ascii characters
(Python's smtplib is not yet able to support the UTF8SMTP).
pull/127/head
Martin Zimmermann 10 years ago
parent ad1fdfdb32
commit 6a3a9ea114

@ -4,7 +4,8 @@ Changelog for Isso
0.9.7 (unreleased)
------------------
- Nothing changed yet.
- fix SMTP authentication using CRAM-MD5 (incorrect usage of
`smtplib`), #126
0.9.6 (2014-08-18)

@ -66,8 +66,8 @@ class SMTP(object):
self.client.starttls();
if self.conf.get('username') and self.conf.get('password'):
self.client.login(self.conf.get('username'),
self.conf.get('password'))
self.client.login(self.conf.get('username').encode('ascii', errors='ignore'),
self.conf.get('password').encode('ascii', errors='ignore'))
return self.client

Loading…
Cancel
Save