I am able to add CC,BCC and TO successfully to message or Mimemessage, But my requirement is I need to send the constructed email to some third party for backup purpose. I Tried this:
message.setRecipient(Message.RecipientType.CC, null);
message.setRecipient(Message.RecipientType.CC, "");
Please help!!!
Use setRecipients instead of setRecipient, with a null address.