Email multiple recipients without revealing other recipients

前端 未结 8 1971
庸人自扰
庸人自扰 2020-12-24 08:20

I\'m using javamail to send emails to a list of recipients, but don\'t want them to be able to see who else received the email. I also don\'t want to send it using BCC sinc

8条回答
  •  别那么骄傲
    2020-12-24 08:38

    You can do this by setting the code as below

    message.setRecipients(Message.RecipientType.BCC, toAddrs);
    

    instead of

    message.setRecipients(Message.RecipientType.TO, toAddrs);
    

提交回复
热议问题