[Feature] #9298 : Add several e-mail addresses into address fields at once
- Resolves https://github.com/nextcloud/mail/issues/6013
Details:
Case 1: string = '[email protected], Jane Doe, MSc [email protected]'
Result:
newRecipients:
Case 2: string = 'ian eiloart [email protected]>;[email protected],, [email protected], "ian,eiloart"<[email protected]>, <@example.com:[email protected]>, foo@#,[email protected], ian@one@two;asdas< [email protected]> [email protected], Newasd Na@,me >; [email protected]'
Result:
newRecipients:
@ChristophWurst I pushed this last commit into this PR for review, and I'm not sure if it applies to this task or not:
- try to add something like this: "Test Test [email protected], Test Test1 [email protected]" I need to compare and then do something?
- If this is the string: "Test Test Test [email protected]/ Test Test Test1 [email protected]" it's wrong and do I need to do something?
Hint this is relevant to this task, if yes, I will cover these cases with code. If there are more, I will be ready to solve them :)
@ChristophWurst any updates here? Thanks :)
This is a bit of a gamble with the regex. Can you make sure that selecting people with titles doesn't split single values? E.g. if "Jane Doe, MSc [email protected]" is entered, it should stay "Jane Doe, MSc [email protected]", not become "Jane Doe" and ", MSc [email protected]"
@ChristophWurst , yes done, I fixed some cases and tested, could you please see the new changes and write me feedback, what do you think about this? Maybe I need to change something in my solution?
P.S. Maybe need to move the regex to another space somewhere, so that it can be accessed in any other classes in the project?
@ChristophWurst I was doing research on this a couple days ago and tried your examples based on thunderbird, gmail and roundcube. So created a more flexible solution based on these apps and my research, so if I need to further improve or change the logic in my solution I will be happy to work on this further :)
Just FYI:
How works Thunderbird:
-
When string = "Jane Doe, MSc [email protected]; Jane Doe, MSc [email protected]" :
-
When string = "Jane Doe, MSc [email protected]" :
How works Web Gmail
-
When string = "Jane Doe, MSc [email protected]; Jane Doe, MSc [email protected]" :
-
When
string = "Jane Doe, MSc [email protected]" :
All of these invalid
Look: rfc822 standard Look: rfc2822 standard
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!