|
@@ -298,12 +298,12 @@ public class EmailUtil {
|
|
return props;
|
|
return props;
|
|
}
|
|
}
|
|
|
|
|
|
- public static void senEmail(MailboxInfoDTO mailboxInfoDTO, String emails, File file,String htmlText) throws Exception {
|
|
|
|
|
|
+ public static void senEmail(MailboxInfoDTO mailboxInfoDTO, String emails, File file,String htmlText,String host) throws Exception {
|
|
logger.info("send email begin .........");
|
|
logger.info("send email begin .........");
|
|
// 根据Session 构建邮件信息
|
|
// 根据Session 构建邮件信息
|
|
MimeMessage message = new MimeMessage(getSession(mailboxInfoDTO));
|
|
MimeMessage message = new MimeMessage(getSession(mailboxInfoDTO));
|
|
// 创建邮件发送者地址
|
|
// 创建邮件发送者地址
|
|
- Address from = new InternetAddress(mailboxInfoDTO.getAccount());
|
|
|
|
|
|
+ Address from = new InternetAddress(mailboxInfoDTO.getAccount()+host);
|
|
String[] emailArr = emails.split(";");
|
|
String[] emailArr = emails.split(";");
|
|
Address[] toArr = new Address[emailArr.length];
|
|
Address[] toArr = new Address[emailArr.length];
|
|
for (int idx = 0; idx < emailArr.length; idx++) {
|
|
for (int idx = 0; idx < emailArr.length; idx++) {
|