Create a InternetAddress and set it to RecipientType BCC

20 views Asked by At

I've created a jakarta.mail.internet.InternetAddress

InternetAddress system = new InternetAddress("[email protected]");

but there is no set to set it as RecipientType BCC

1

There are 1 answers

0
Adam Kowieski On BEST ANSWER

InternetAddress is an object used to define address and has no property of type. However you can set the type when added this address to your message:

InternetAddress system = new InternetAddress("[email protected]"); message.setRecipients(Message.RecipientType.TO, system);