I have the following ...
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
Which works fine, but when I try to add this several times (with different variables for to ), it only sends the last statement. I also tried sending something like email1@gmail.com : email2@gmail.com as the variable to , but this will throw an error.
Does anyone have any suggestions on how I sent mail to multiple recipients using ONLY one email and not multiple email messages using javax.mail ?
source share