开发者

sending email with java API

开发者 https://www.devze.com 2023-03-13 14:12 出处:网络
i want to make a simple program in java that send a email t开发者_运维技巧o original person and cc person but email are send only to cc person.

i want to make a simple program in java that send a email t开发者_运维技巧o original person and cc person but email are send only to cc person. i am using coding stuff like as:

InternetAddress[] toMail = InternetAddress.parse(to,false);
InternetAddress[] ccMail = InternetAddress.parse(cc,false);
msg.addRecipients(Message.RecipientType.TO,toMail);
msg.addRecipients(Message.RecipientType.CC,ccMail);

please help.

thanks


According to the Error posted here there could be many possibilities where you are putting you email address as Empty String ("")

Please try to print the email address of To, CC, and Sender just to make sure if they are correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消