bbottema/simple-java-mail

List of Recipients not ordered as added (insertion order not maintained)

moqimoqidea opened this issue · 8 comments

When I need to send a message to multiple recipients, no matter which method call I use, the order of the recipients is always lexicographically sorted. When I use the package of the JavaMail project to complete this function, the recipients are displayed in the order I entered.

Can you let me know why recipients would need to be ordered according entering? I would like to know the use-case here.

First of all, I am very happy to get your reply.
In my work environment, the names of some important customers always start with xyz, and they want their names to appear first in the mail recipient. I can understand that Simple-Java-Mail has to sort and reorder the recipient list in order to maintain the format of various recipients, but the reality is that I do have such a requirement.
Maybe this discussion will lead to a philosophical issue. The recipients are all in the same place so they should be equal. I think it ’s similar to submitting a paper. The order of the co-authors ’signatures reflects their personal contributions to the project, so my point is that people always need to specify a certain order, even if everyone is Author of this paper.
If possible, I hope that the method for processing the sender order in Simple-Java-Mail can be overloaded with a boolean parameter. This parameter specifies whether to sort in the input order?
Thank you very much.

Interesting, I'm not even sure I have control of the order. For example, when sending from Outlook and receiving in gMail, do they appear in the order that you added them? I'll have to run a test lateron to verify.

Thank you for your excellent work. :)

Fix will be in v6.0.1 as soon as 6.0.0-rc2 comes out of the incubator. Will be a few weeks.

I guess the milestone of this issue should be updated, as it was released as part of 6.0.0-rc3.

I guess the milestone of this issue should be updated, as it was released as part of 6.0.0-rc3.

Oops. Thanks for the heads up.

6.0.0 has released as well, finally.