jadolg / webpymail

Automatically exported from code.google.com/p/webpymail
GNU General Public License v3.0
0 stars 0 forks source link

SMTP Authentication error #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This happend when webpymail try to login to Ramblers SMTP (compose view).
Error text is: character mapping must return integer, None or unicode.

After googling, found similar bug http://trac.edgewall.org/ticket/8083 that 
pointed out than we need to encode login+password to UTF for SMTPs

Folowing code fixed my problem, but I have not understood the problem: sending 
message with google does not raised such error.

#mail_utils.py:249
    if user:
        s.login(user.encode('utf-8'), passwd.encode('utf-8'))

Original issue reported on code.google.com by akimov.alex on 13 Sep 2010 at 9:44

GoogleCodeExporter commented 9 years ago
Your password must have non ascii characters, when they are converted to base64 
to do a plain auth they are wrongly encoded and the error issues (Check RFC 
4954). You can uncomment mail_utils.py:244 

 s.set_debuglevel(10)

To see what's different between the two versions.

Will apply your fix. (I positively hate unicode problems...)

Original comment by hguerreiro@gmail.com on 13 Sep 2010 at 7:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r75.

Original comment by hguerreiro@gmail.com on 13 Sep 2010 at 7:56