This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benjamin.peterson, giampaolo.rodola, hdima, vstinner
Date 2008-10-17.00:05:28
SpamBayes Score 0.0005014917
Marked as misclassified No
Message-id <1224201935.31.0.960997400279.issue3727@psf.upfronthosting.co.za>
In-reply-to
Content
New patch: resp() returns bytes
 - self.file is now a binary file
 - encode commands using POP3.encoding charset, default is UTF-8
 - use md5.hexdigest()
 - factorize POP3_SSL code: code specific for SSL is just the creation 
of the socket

The default charset is UTF-8, but most servers only accept pure ASCII 
login/password (eg. gmail.com) or a smaller subset of ASCII (eg. only 
A-Z, a-z, 0-9 and some ponctuation signs :-/). If you user non-ASCII 
login/password and your server doesn't use UTF-8, change POP3.encoding 
or <your pop object>.encoding (encoding is not used in the 
constructor).

welcome attribute (and getwelcome() results) is a bytes string.

You have to parse the message headers to get the right charset to 
decode bytes to unicode characters. A multipart message may contains 
two or more charsets and different encoding. But poplib is not 
responsible to decode messages, just to download a message as bytes.

Arguments (username (login), password, a message identifier) are 
unicode strings. For a message identifier, you can also use an integer 
(nothing new, it was already possible).

I hope that apop() works. No Python error is raised but no server does 
support his authentication method. I tested 3 servers 
(pop3.haypocalc.com, pop.laposte.net and pop.gmail.com) and none 
supports APOP. I tested POP3 and POP3_SSL (gmail requires SSL).
History
Date User Action Args
2008-10-17 00:05:35vstinnersetrecipients: + vstinner, hdima, giampaolo.rodola, benjamin.peterson
2008-10-17 00:05:35vstinnersetmessageid: <1224201935.31.0.960997400279.issue3727@psf.upfronthosting.co.za>
2008-10-17 00:05:34vstinnerlinkissue3727 messages
2008-10-17 00:05:32vstinnercreate