"Send Later" on a message with only BCC recipients doesn't insert To: undisclosed-recipients: ; header

RESOLVED FIXED in Thunderbird 66.0

Status

defect
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: jorgk, Assigned: jorgk)

Tracking

unspecified
Thunderbird 66.0

Thunderbird Tracking Flags

(thunderbird_esr6065+ fixed, thunderbird65 fixed, thunderbird66 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

STR:
New message, add BCC recipient, Ctrl+Shift+Enter.
Check message in Outbox. No To: undisclosed-recipients: ;

Works when message is sent straight away.
This addes the undisclosed-recipients when the message is saved in the Outbox. However, it cannot be sent, I get:

There are non-ASCII characters in the local part of the recipient address . This is not yet supported. Please change this address and try again.

Note the space before the dot, so the %s replacement has actually not worked :-(

errorIllegalLocalPart=There are non-ASCII characters in the local part of the recipient address %s. This is not yet supported. Please change this address and try again.
This is really messy. When I add undisclosed-recipients with the patch, sending fails here:
https://searchfox.org/comm-central/rev/03af5b2cc1c3d24641b60f7f72a4a7d533865a1f/mailnews/compose/src/nsSmtpProtocol.cpp#339

I only get one empty address :-( - Hence the replacement of % with an empty string. Without the patch, I get the BCC recipient. So something really twisted going on. So if some other code sees the To: it doesn't collect the BCC or some such :-(
OK, this fixes it. Note that there was a bug in StripOutGroupNames(). With the correction the debug shows:
=== send buf |undisclosed-recipients: ;,jorgk@jorgk.com|
=== send buf | ,jorgk@jorgk.com|

Without the correction it shows:
=== send buf |undisclosed-recipients: ;,jorgk@jorgk.com|
=== send buf |u ,jorgk@jorgk.com|

so the group isn't correctly stripped. "u" doesn't have an e-mail address, hence the error described in comment #1.

I left the debug in for the reviewers convenience.

This fix comes too late for my Christmas message which sadly went out without
To: undisclosed-recipients: ;
:-(
Assignee: nobody → jorgk
Attachment #9033384 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #9033439 - Flags: review?(acelists)
Comment on attachment 9033439 [details] [diff] [review]
1516509-undisclosed-recipients.patch (v2)

Review of attachment 9033439 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, I have tested both Send and Send later with a Bcc recipient, and they work with this patch.
Attachment #9033439 - Flags: review?(acelists) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/152f35832bad
add undisclosed-recipients when queueing message. r=aceman DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 66.0
Attachment #9033439 - Flags: approval-comm-esr60+
Attachment #9033439 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.