Cannot send message to distribution list

RESOLVED FIXED in Thunderbird 51.0

Status

Thunderbird
Message Compose Window
RESOLVED FIXED
a year ago
7 months ago

People

(Reporter: Mark Schuster, Assigned: aceman)

Tracking

({regression})

51 Branch
Thunderbird 51.0
regression
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

132.06 KB, image/jpeg
Details
6.39 KB, patch
Jorg K (GMT+1) [currently bustage-fix only, no NI? or r?]
: review+
Details | Diff | Splinter Review
(Reporter)

Description

a year ago
Created attachment 8782775 [details]
Bug_Thunderbird_distribution_Lists.JPG

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce:

I have several distribution lists all under 30 recipients and when choosing a list (it doesn't matter which - they ALL do it), the "Send" tab is grayed out.  Neither "To:, :Cc:" nor "Bcc:" will accept a distribution list to send a message.

I can to each member by placing their address in the "To:" field.


Actual results:

Nothing can happen as the "Send" tab is grayed.


Expected results:

My distribution lists have not changed from 49.0a1 to 51.0a1.
(Reporter)

Updated

a year ago
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
(Reporter)

Comment 1

a year ago
I also tried re-creating the Lima Ambulance list from scratch on 51.0a1 and it too failed.  It doesn't matter if I send to "To:" or, "Cc:" or, "Bcc:" individually none work.
Thanks for reporting this. And thanks for using Daily, which can have some unexpected bugs ;-)

Note: TB 51. Aceman, we broke this in bug 1290733. We didn't think of mailing lists.
Blocks: 1290733
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(acelists)
Keywords: regression
(Assignee)

Comment 3

a year ago
Yeah. Expanding lists and then checking each recipient may be slow again.
But the previous method also didn't expand recipients, it just saw if anything was input. So do we again just check for a non-empty input (but not via msgCompFields)? Then expansion of ML and checking of @ in recipients is still done upon clicking Send.
Flags: needinfo?(acelists)
(In reply to :aceman from comment #3)
> But the previous method also didn't expand recipients, it just saw if
> anything was input. So do we again just check for a non-empty input (but not
> via msgCompFields)?
Sigh, I got used to the "Send" only becoming available after typing at least "a@b".

Is there no better way to detect mailing lists? List seem to show up as
  list <list>.
(Assignee)

Comment 5

a year ago
https://dxr.mozilla.org/comm-central/source/mailnews/compose/src/nsMsgCompose.cpp#4785

I wouldn't want to reimplement that logic in JS again. Can we some of that existing code from the frontend?
(Assignee)

Comment 6

a year ago
But I'd also like to avoid some expensive calls into nsMsgCompose and having to pass it all the input recipients first.
(Assignee)

Comment 7

a year ago
Maybe we could use https://dxr.mozilla.org/comm-central/source/mailnews/addrbook/public/nsIAbManager.idl#158 on the input string?
(Assignee)

Comment 8

a year ago
Created attachment 8783202 [details] [diff] [review]
patch

Maybe like this.
(Assignee)

Updated

a year ago
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Component: Untriaged → Message Compose Window
OS: Windows 10 → All
Hardware: x86_64 → All
Comment on attachment 8783202 [details] [diff] [review]
patch

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

How expensive is this?

::: mail/components/compose/content/MsgComposeCommands.js
@@ +2966,5 @@
>      let popupValue = awGetPopupElement(row).value;
>      let inputValue = awGetInputElement(row).value.trim();
> +    if ((mailTypes.includes(popupValue) &&
> +        (isValidAddress(inputValue) ||
> +         MailServices.ab.mailListNameExists(inputValue.replace(/ <.*>/, "")))) ||

Looks reasonable. From past experience I'd be careful with the whitespace, so cater for zero to more than one space.
(Assignee)

Comment 10

a year ago
On an extreme case of 1000 recipients where all of them are invalid strings (no @ and not a valid ML name) the loop takes 0.1-0.2 secs.

OK, I made the regexp '.replace(/ *<.*>/, "")'. It covers name formats of "list <anything>", "list<anything>" and even "list".
Created attachment 8783276 [details] [diff] [review]
Added check for mailing list

Changed the regexp as discussed to / *<.*>/

I tested it and it seemed to work ;-)
Attachment #8783202 - Attachment is obsolete: true
Attachment #8783276 - Flags: review+
For those watching the bug: Aceman told me that he will be adding a test so this doesn't regress easily. Thanks, Aceman!
(Assignee)

Comment 13

a year ago
Created attachment 8783357 [details] [diff] [review]
Added check for mailing list + test

Added the test. Can you imagine any other case we need to check? The test fails without the patch.
Attachment #8783276 - Attachment is obsolete: true
Attachment #8783357 - Flags: review?(jorgk)
Comment on attachment 8783357 [details] [diff] [review]
Added check for mailing list + test

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

Nice. I didn't run it, but I suppose you did. No, I can't imagine more test cases. Well, unless you want to check trimming and such, so type
|   |
|  a@b  |
|  newsgroup  |
|list<list>|
|  list  <list>  |
etc. I tried those manually and I inspected the code to make sure we trim properly.

Can you do me a favour? Land this after bug 1296883 so I can see that the X tests clear again.
Attachment #8783357 - Flags: review?(jorgk) → review+
(Assignee)

Comment 15

a year ago
OK, pushed also with some spaces to test the trimming.
https://hg.mozilla.org/comm-central/rev/93fae187ff9b3dbc56e53c89388b6e2f36fde00b
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
Note, the Mozmill failures appearing in the push are not due to this bug, but due to the landing of bug 1265800. I'll raise a new bug for that.
(Reporter)

Comment 17

a year ago
I don't know if this has been included in the release 51.0a1 (2016-08-22) but in this update, sending to ML still does not work.

Also, second problem: I wanted to check the Release Notes (Settings/Help/Release Notes) to see if the patch had been applied but viewing the Release Notes returns the following web page: https://www.mozilla.org/en-US/thunderbird/nightly/releasenotes/?uri=/thunderbird/releasenotes/&locale=en-US&version=51.0a1&os=WINNT&buildid=20160822030425
The bug got landed in the afternoon, 51.0a1 (2016-08-22) was built at noon. Try the Daily of 23rd.

There are no release notes for Daily versions.
(Reporter)

Comment 19

a year ago
Roger that.  Thanks for what you do!
(Reporter)

Comment 20

a year ago
I have to say something that I may have said before and will say again, I'm sure... I have to thank the men and women who spend countless hours of their own time, and I'm sure at the same pay as those of us who volunteer our time, as first responders, to help others.  Without their dedication and love of accomplishment when they finally squish the bug, we would not have these great products that increase our productivity, save us time and that we may take for granted.  My hat is off to you all and a special thanks to Jorg K and :aceman for your efforts in correcting this problem. 

Job well done!
Thunderbird is maintained by overworked and unpaid(!) volunteers only. We accept donations:
https://donate.mozilla.org/en-US/thunderbird/about/

The reasons are given on the TB start page:
https://www.mozilla.org/en-US/thunderbird/release/start/
(In reply to Jorg K (GMT+2, PTO during summer) from comment #18)
> Try the Daily of 23rd.
Works now in this version.
(Reporter)

Comment 23

a year ago
I put my money where my mouth is... Done.  ;-)
(Assignee)

Updated

7 months ago
Depends on: 1356881

Comment 24

7 months ago
This bug seems to reappear in version 52.0 and 52.1.  I am unable to send message to distribution list unless I also add a single e-mail address in addition to the distribution list.
(Assignee)

Comment 25

7 months ago
What is your OS? Is that list in the Thunderbird internal addressbook or in Mac OS X addressbook or in Outlook addressbook?

Comment 26

7 months ago
I am using Win10 Pro.  My distribution list is in the internal Thunderbird address book.  I do not use Mac OS or Outlook.  I have only used Thunderbird and the internal address book for years.
(Assignee)

Comment 27

7 months ago
You say the problem reappeared. In which TB versions did it work for you?
Note that the reporter opened the exact same bug 1362130.

Comment 29

7 months ago
Yes, that was my post.  I will continue this duscussion on but 1362130.  I started a new one because I didn't know if you would respond to a posting to a bug that was marked fixed.
You need to log in before you can comment on or make changes to this bug.