Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java mail:How to send CC & BCC?

 
Anithavin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i send mail to multiple recipients using CC and BCC in java mail??
 
Alvin de Jesus
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be done by doing:
message.setRecipients(Message.RecipientType.CC, CC);
message.setRecipients(Message.RecipientType.BCC, BCC);
I hope this helps!
 
Anithavin
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
InternetAddress[] address1 = {new InternetAddress();address1.parse(request.getParameter("cc"))};
newMessage.setRecipients(Message.RecipientType.BCC, address1);
I used this !even then it doesn't work!
 
Maky Chopra
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anithavin,
The javaranch has a naming policy and your login name does not meet the requirement.
Please signup again with a proper name.
Thanks..
 
Jayson Falkner
Author
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anithavin:
How do i send mail to multiple recipients using CC and BCC in java mail??

You can also use a custom tag library to do this easily with JSP. Here is a free one that uses the JavaMail API
http://www.jspinsider.com/jspkit/javamail/jspkit_javamail.html
Source code is included if you wish to tinker.
Jayson Falkner
V.P./CTO, Amberjack Software LLC
Jayson@jspinsider.com www.jspinsider.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic