Created on 2015-04-27 21:26 by kirelagin, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (7) |
|
|
msg242158 - (view) |
Author: Kirill Elagin (kirelagin) |
Date: 2015-04-27 21:26 |
If I have a message with multiple `To` headers and I send it using `send_message` not specifying `to_addrs`, the message gets sent only to one of the recipients. I’m attaching my patch that makes it send to _all_ the addresses listed in `To`, `Cc` and `Bcc`. I didn’t add any new tests as the existing ones already cover those cases and I have no idea how on Earth do they pass. |
|
|
msg242163 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2015-04-28 01:44 |
Kirill, the patch is missing. |
|
|
msg242167 - (view) |
Author: Kirill Elagin (kirelagin) |
Date: 2015-04-28 06:35 |
x_x |
|
|
msg242361 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2015-05-02 00:46 |
Can you write a test that shows the failure? There is an existing test that demonstrates sending to multiple addresses (testSendMessageWithAddresses), so you must have found an edge case that isn't tested. (Either that, or the existing test is broken.) |
|
|
msg242385 - (view) |
Author: Kirill Elagin (kirelagin) |
Date: 2015-05-02 08:11 |
Ah, I’m so dumb. Of course the tests work as there are multiple addresses but still just one field. Here is the test for multiple fields. |
|
|
msg242394 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2015-05-02 12:39 |
Ah, but that is intentional. Those fields can only appear once per message, per the RFC. The new email API will raise an error if you attempt to add them more than once. Perhaps we should raise an error instead of ignoring the duplicates, given that we are actively inspecting those headers. |
|
|
msg242396 - (view) |
Author: Kirill Elagin (kirelagin) |
Date: 2015-05-02 13:04 |
Oh, I see now. It is a good idea to raise an error either in `send_message` or at the moment when a second `To`/`Cc`/`Bcc` header is added to the message. |
|
|
History |
|
|
|
Date |
User |
Action |
Args |
2022-04-11 14:58:16 |
admin |
set |
github: 68254 |
2015-05-02 13:04:06 |
kirelagin |
set |
status: open -> closedresolution: not a bugmessages: + |
2015-05-02 12:39:56 |
r.david.murray |
set |
messages: + |
2015-05-02 08:11:38 |
kirelagin |
set |
files: + multiple_fields_test.patchmessages: + |
2015-05-02 00:46:05 |
r.david.murray |
set |
messages: + stage: patch review -> test needed |
2015-04-28 06:47:47 |
ned.deily |
set |
nosy: + barry, r.david.murray, - ned.deilystage: patch reviewversions: + Python 3.5 |
2015-04-28 06:35:11 |
kirelagin |
set |
files: + multiple_to.patchkeywords: + patchmessages: + |
2015-04-28 01:44:05 |
ned.deily |
set |
nosy: + ned.deilymessages: + |
2015-04-27 21:26:12 |
kirelagin |
create |
|