sending mail to multiple recipients
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   krishnan_acs
Posted On:   Thursday, April 13, 2006 01:34 AM

i am able to send mail to a single person...but to send to a group i tried to use cc but i could not....can anybody help me

Re: sending mail to multiple recipients

Posted By:   Harsh_Sugandhi  
Posted On:   Thursday, April 13, 2006 04:37 AM

Hi,

I hope your are using something similar:

Address to = new InternetAddress("toaddress@something.com");
Address cc = new InternetAddress("ccaddress@something.com");
msg.addRecipient(Message.RecipientType.TO, to);
msg.addRecipient(Message.RecipientType.CC, cc);

There is a very good tutorial on JavaMail. You can check the same for more details, link is:
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html


- Harsh
About | Sitemap | Contact