The message.setFrom(new InternetAddress(from)); line is suffcient to include a name with the line, where from would be a string like "\"Bill Clinton\" <[email protected]>". You can also use the constructor public InternetAddress(java.lang.String address, java.lang.String personal) that allows you to pass the address and personal information separately. Or, you can even call the setPersonal() method to directly set the information on an existing InternetAddress.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货