I want to send a message to multiple Recipients using following the method :
message.addRecipient(Message.RecipientType.TO, String arg1);
<
String[] mailAddressTo = new String[3];
mailAddressTo[0] = emailId_1;
mailAddressTo[1] = emailId_2;
mailAddressTo[2] = "xyz@gmail.com";
InternetAddress[] mailAddress_TO = new InternetAddress[mailAddressTo.length];
for (int i = 0; i < mailAddressTo.length; i++)
{
mailAddress_TO[i] = new InternetAddress(mailAddressTo[i]);
}
message.addRecipients(Message.RecipientType.TO, mailAddress_TO);ress_TO = new InternetAddress[mailAddressTo.length];