The following code snippet demonstrates how you can send to multiple recipients from java :
String toList = "email1@emailserver.com,email2@emailserver.com" ; String to [] = to.split(","); InternetAddress[] addresses = new InternetAddress[to.length]; for (int i = 0; i < to.length; i++) addresses[i] = new InternetAddress(to[i]); msg.setRecipients(Message.RecipientType.TO, addresses);
No comments yet.
Name (required)
Mail (will not be published) (required)
Website
( Cancel )
Please note: JavaScript is required to post comments. Spam protection by WP Captcha-Free
No trackbacks yet.