Commit ef4ea8de authored by 赵建伟's avatar 赵建伟

update codes

parent 70e2e2bc
...@@ -44,7 +44,7 @@ public class BiReportServiceImpl implements BiReportService { ...@@ -44,7 +44,7 @@ public class BiReportServiceImpl implements BiReportService {
if(Constants.SUCCESS == genExcelRs){ if(Constants.SUCCESS == genExcelRs){
int rs = emailService.sendAttachmentsMail(to, cc, name); int rs = emailService.sendAttachmentsMail(to, cc, name);
if(rs == Constants.FAIL){ if(rs == Constants.FAIL){
throw new Exception("邮件发送失败,请核实!"); throw new Exception("收件人或抄送人邮件地址有误,未完全发送成功,请核实!");
} }
} }
} }
......
...@@ -107,7 +107,7 @@ public class EmailServiceImpl implements EmailService { ...@@ -107,7 +107,7 @@ public class EmailServiceImpl implements EmailService {
List<String> invalid = getInvalidAddresses(e); List<String> invalid = getInvalidAddresses(e);
for(String toUser : toUsers){ for(String toUser : toUsers){
if(invalid.contains(toUser)){ if(invalid.contains(toUser)){
logger.warn("剔除无效接收人邮箱地址:{}",toUser); logger.error("剔除无效接收人邮箱地址:{}",toUser);
continue; continue;
} }
validToUsers = validToUsers + toUser + ","; validToUsers = validToUsers + toUser + ",";
...@@ -115,7 +115,7 @@ public class EmailServiceImpl implements EmailService { ...@@ -115,7 +115,7 @@ public class EmailServiceImpl implements EmailService {
String validCcUsers = ""; String validCcUsers = "";
for(String ccUser : ccUsers){ for(String ccUser : ccUsers){
if(invalid.contains(ccUser)){ if(invalid.contains(ccUser)){
logger.warn("剔除无效抄送人邮箱地址:{}",ccUser); logger.error("剔除无效抄送人邮箱地址:{}",ccUser);
continue; continue;
} }
validCcUsers = validCcUsers + ccUser + ","; validCcUsers = validCcUsers + ccUser + ",";
...@@ -124,6 +124,7 @@ public class EmailServiceImpl implements EmailService { ...@@ -124,6 +124,7 @@ public class EmailServiceImpl implements EmailService {
validToUsers = validToUsers.substring(0, validToUsers.length() - 1); validToUsers = validToUsers.substring(0, validToUsers.length() - 1);
validCcUsers = validCcUsers.substring(0, validCcUsers.length() - 1); validCcUsers = validCcUsers.substring(0, validCcUsers.length() - 1);
sendAttachmentsMail(validToUsers,validCcUsers,name); sendAttachmentsMail(validToUsers,validCcUsers,name);
return Constants.FAIL;
} }
} }
return Constants.SUCCESS; return Constants.SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment