Error messages when I used the comma separator:
(note: edresses were changed to protect the not-so-innocent)
- 2021-03-10 11:30:43.237 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:30:43.237 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending mail message - 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:30:43.249 WARN 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending failed = 'Could not parse mail; nested exception is javax.mail.internet.AddressException: Illegal address in string ``edress1@gmail.com,edress2@gmail.com'''
- 2021-03-10 11:31:34.019 INFO 8924 --- [nio-8085-exec-3] u.s.p.v.i.VaadinNotificationsServiceImpl : User 'testuser' saves 'EmailConfig{id=0, createTime=1574442609, enabled=true, smtpServer='smtp-relay.gmail.com', smtpPort=587, authEnabled=true, smtpUsername='listemail1@gmail.com', smtpPassword='33 characters', useTls=true, mailFrom='listemail1@gmail.com', mailTo='edress1@gmail.com;edress2@gmail.com'}'
- 2021-03-10 11:32:43.235 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:32:43.236 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending mail message - 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:32:43.237 WARN 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending failed = 'Could not parse mail; nested exception is javax.mail.internet.AddressException: Illegal address in string ``edress1@gmail.com,edress2@gmail.com'''
- 2021-03-10 11:37:58.245 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:37:58.245 INFO 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending mail message - 'RichMailMessage{from='listemail1@gmail.com', replyTo='listemail1@gmail.com', to=[edress1@gmail.com,edress2@gmail.com], subject='Unimus - job report', attachments=[]}'
- 2021-03-10 11:37:58.246 WARN 8924 --- [TaskScheduler-1] n.u.c.service.mail.QueuedMailSenderImpl : Sending failed = 'Could not parse mail; nested exception is javax.mail.internet.AddressException: Illegal address in string ``edress1@gmail.com,edress2@gmail.com'''
Looking at the changelog, I see that in 2.0.5 (*) there was an email send fix (?), but this must be something that isn't covered/envisioned by that fix. I also see back in 1.10.0(**), there was a feature that Unimus would keep trying to send an email for an hour, before failing. I certainly didn't let it run for an hour, so I have no idea how long it would have run. I would also suggest that the length of time (or perhaps the repetition frequency) be configurable. My audit log reviews are long enough without having hundreds of duplicate entries, a few milliseconds apart.
On the edress, my suggestion would be to parse of the edress field, not accepting it until non-valid characters (such as the comma or semicolon) are removed. Just a suggestion though. Of course I could have accepted the verbiage of the single "To Email Address" and assumed only one edress, but that's no fun.
Dave
Changelog Entries:
###############################################################################
(*)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= Version 2.0.5 =
Fixes:
Fixed email notifications stopped working if email server didn't respond to outbound email
(**)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= Version 1.10.0 =
Features:
Emails expire from email sender queue after 1 hour if they fail to send within this period
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=