unable to send email to more then one email id
Posted
by rupesh
on Stack Overflow
See other posts from Stack Overflow
or by rupesh
Published on 2010-05-15T09:44:25Z
Indexed on
2010/05/15
9:54 UTC
Read the original article
Hit count: 227
Hi all
I am using the below code to send the email to more then one id, but the mail is not getting delivered.
Address [] toAddresses = new Address[emailto.length];
for (i = 0; i <= emailto.length ; i++ ) {
toAddresses[i] = new Address(emailto[i], emailto[i]);
}
//Adding Recipients address whose type is TO.
msg.addRecipients(Message.RecipientType.TO, toAddresses);
emailto is a string array which stores email id's. m i going wrong ?? and i also want to send email to cc how to proceed for that
Thanks alot
© Stack Overflow or respective owner