How to send emails to multiple recipients using sendMail service method
![]()
Martin Wassermann (138●6●41●44)
| asked Oct 01 '13, 7:19 a.m.
edited May 27 '15, 3:38 a.m. by Piotr Aniola (3.7k●1●17●38)
Hi,
I send mails from my precondition with the service method sendMail(MailSender sender, String toAddress, String subject, String msg, String cc) For only one recipients it works fine, but I fail to use this method to send mails to multiple recipients. I tried it with comma separated mail addresses (with and without spaces e,g, address1@mail.de,adress2@mail.de) and with semicolon separated mail addresses. But every time I receive the following exception javax.mail.internet.AddressException: Illegal address in string ``address1@mail.de,adress2@mail.de'' So, how must the toAdress parameter be formatted so that the mail will be send to multiple recipients? Thanks and regards Martin |
Accepted answer
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.