• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail question.........  RSS feed

 
Veronica Damian
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I'm trying to send email to two addresses... thus have:

message.setRecipient(Message.RecipientType.TO, to);
message.addRecipient(Message.RecipientType.TO, toW);

I get an error unless I remove 2nd line...

(I don't want to add both recipients in one stmt because the 2nd one will go inside a conditional; whether email gets sent to 2nd address also will depend on whether user checks a checkbox in the form..)

if I use addRecipient() for both addresses, thus:

message.addRecipient(Message.RecipientType.TO, to);
message.addRecipient(Message.RecipientType.TO, toW);

I also get an error.. only way I don't get an error is if I leave only one of the two stmts..

thank you very much...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!