dcsimg

How do I use BCC to hide recipient addresses?

John Zukowski

When you add a recipient InternetAddress, use Message.RecipientType.BCC:


String addressString = 
  "bill@microsoft.com";
InternetAddress bcc = 
  new InternetAddress(addressString);
message.addRecipient(
  Message.RecipientType.BCC, bcc);