Commit 5d8f46cb11009888adc565173b4dc2a25a06fa89
1 parent
e82b0342
路单日志发送邮件修改(防垃圾邮箱)
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| @@ -35,6 +35,7 @@ import org.springframework.data.domain.Sort.Direction; | @@ -35,6 +35,7 @@ import org.springframework.data.domain.Sort.Direction; | ||
| 35 | import org.springframework.stereotype.Service; | 35 | import org.springframework.stereotype.Service; |
| 36 | 36 | ||
| 37 | import java.io.*; | 37 | import java.io.*; |
| 38 | +import java.net.InetAddress; | ||
| 38 | import java.sql.Connection; | 39 | import java.sql.Connection; |
| 39 | import java.sql.PreparedStatement; | 40 | import java.sql.PreparedStatement; |
| 40 | import java.sql.ResultSet; | 41 | import java.sql.ResultSet; |
| @@ -530,7 +531,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | @@ -530,7 +531,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ | ||
| 530 | try { | 531 | try { |
| 531 | //发送邮件 | 532 | //发送邮件 |
| 532 | EmailBean mail = new EmailBean(); | 533 | EmailBean mail = new EmailBean(); |
| 533 | - mail.setSubject("浦东路单日志数据"+date); | 534 | + mail.setSubject(InetAddress.getLocalHost().getHostAddress()+":路单日志数据"+date); |
| 534 | mail.setContent(logSuccess+"<br/>成功数:"+countSuccess+"<br/>" +logFailure+"<br/>失败数:"+countFailure); | 535 | mail.setContent(logSuccess+"<br/>成功数:"+countSuccess+"<br/>" +logFailure+"<br/>失败数:"+countFailure); |
| 535 | sendEmailController.sendMail(emailSendToAddress, mail); | 536 | sendEmailController.sendMail(emailSendToAddress, mail); |
| 536 | logger.info("setLD-sendMail:邮件发送成功!"); | 537 | logger.info("setLD-sendMail:邮件发送成功!"); |