Issue 2550531
Created on 2009-03-17 06:52 by loewis, last changed 2009-03-17 22:54 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
email.diff
|
loewis,
2009-03-17 06:52
|
|
|
|
msg3653 |
Author: [hidden] (loewis) |
Date: 2009-03-17 06:52 |
|
Sending email is severely broken in 1.4.7. The following issues exist:
- get_standard_message used to return a tuple, but now returns a pair.
client.py still expect it to return a tuple, and still wants to use
the writer that gets returned.
- smtp_send expects a string; several places pass an email Message
object (client.py, send_message, standard_message). I fixed them by
explicitly invoking str() (as done in several other places; perhaps it
might be better to have smtp_send accept Message objects. Also, I'm not
sure whether str() is the preferred API; there is also .as_string(); the
former defaults to including a unix_from line, the latter doesn't. I
think you don't need the unix_from in SMTP.
- several places create duplicate headers. In email.message, you need to
del a header before setting it anew, otherwise, you get two headers of
the same type. This happens to Content-type and
Content-transfer-encoding in particular.
- several places fail have the content-transfer-encoding match the body;
the encoding defaults to base64 (as the charset is utf-8); still, they
pass completely unquoted payload. I added encode_quopri calls into these
places.
|
msg3659 |
Author: [hidden] (richard) |
Date: 2009-03-17 22:54 |
|
Thanks for the patch Martin.
|
|
Date |
User |
Action |
Args |
2009-03-17 22:54:29 | richard | set | status: new -> closed resolution: accepted messages:
+ msg3659 nosy:
+ richard |
2009-03-17 06:52:24 | loewis | create | |
|