Message74883
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). |
|
Date |
User |
Action |
Args |
2008-10-17 00:05:35 | vstinner | set | recipients:
+ vstinner, hdima, giampaolo.rodola, benjamin.peterson |
2008-10-17 00:05:35 | vstinner | set | messageid: <1224201935.31.0.960997400279.issue3727@psf.upfronthosting.co.za> |
2008-10-17 00:05:34 | vstinner | link | issue3727 messages |
2008-10-17 00:05:32 | vstinner | create | |
|