How to send emails to multiple recipients using sendMail service method
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
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