Commit 3f77071f43b2dfe3b9cb988d6c754c778866ba86
1 parent
3f055d7a
邮件发送记录加入日志
Showing
1 changed file
with
11 additions
and
5 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| @@ -527,11 +527,17 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -527,11 +527,17 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 527 | } | 527 | } |
| 528 | e.printStackTrace(); | 528 | e.printStackTrace(); |
| 529 | }finally{ | 529 | }finally{ |
| 530 | - //发送邮件 | ||
| 531 | - EmailBean mail = new EmailBean(); | ||
| 532 | - mail.setSubject("路单日志数据"+date); | ||
| 533 | - mail.setContent(logSuccess+"<br/>成功数:"+countSuccess+"<br/>" +logFailure+"<br/>失败数:"+countFailure); | ||
| 534 | - sendEmailController.sendMail(emailSendToAddress, mail); | 530 | + try { |
| 531 | + //发送邮件 | ||
| 532 | + EmailBean mail = new EmailBean(); | ||
| 533 | + mail.setSubject("路单日志数据"+date); | ||
| 534 | + mail.setContent(logSuccess+"<br/>成功数:"+countSuccess+"<br/>" +logFailure+"<br/>失败数:"+countFailure); | ||
| 535 | + sendEmailController.sendMail(emailSendToAddress, mail); | ||
| 536 | + logger.info("setLD-sendMail:邮件发送成功!"); | ||
| 537 | + }catch (Exception e){ | ||
| 538 | + e.printStackTrace(); | ||
| 539 | + logger.error("setLD-sendMail:",e); | ||
| 540 | + } | ||
| 535 | } | 541 | } |
| 536 | return result; | 542 | return result; |
| 537 | } | 543 | } |