Send Mail to multiple Recipients in java

后端 未结 12 745
孤城傲影
孤城傲影 2020-12-02 08:23

I want to send a message to multiple Recipients using following the method :

message.addRecipient(Message.RecipientType.TO, String arg1);

<

12条回答
  •  我在风中等你
    2020-12-02 09:03

    So ... it took many months, but still ... You can send email to multiple recipients by using the ',' as separator and

    message.setRecipients(Message.RecipientType.CC, "abc@abc.com,abc@def.com,ghi@abc.com");
    

    is ok. At least in JavaMail 1.4.5

提交回复
热议问题