开发者

sending email with java API

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜