I've got the following...
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
Which works fine but when I attempt to add this multiple times (with different variables for to
) it only sends to the last statement. I've also attempted sending something like [email protected] :[email protected]
as the to
variable but this throws back an error.
Does anyone have any suggestions as to how I'd send mail to multiple recipients using JUST one e-mail and not multiple e-mails using javax.mail
?
msg.setRecipients()
takes an array of addresses as the second parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With