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.
精彩评论