[修改]发送邮件
This commit is contained in:
+12
-12
@@ -121,18 +121,18 @@ public class SendMessageServiceImpl implements SendMessageService {
|
||||
}
|
||||
email = PasswordUtil.decrypt(email);
|
||||
emailPassword = PasswordUtil.decrypt(emailPassword);
|
||||
//EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
|
||||
//// 发送带附件邮箱
|
||||
// if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
|
||||
// emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
|
||||
// }else{
|
||||
// //如果有通知内容就替换
|
||||
// if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
|
||||
// }else {
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
|
||||
// }
|
||||
// }
|
||||
EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
|
||||
// 发送带附件邮箱emailPassword = "wflwijcpdmwvcihc"
|
||||
if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
|
||||
emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
|
||||
}else{
|
||||
//如果有通知内容就替换
|
||||
if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
|
||||
emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
|
||||
}else {
|
||||
emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error("发送邮件异常",e);
|
||||
if (e.getMessage() !=null){
|
||||
|
||||
@@ -25,6 +25,7 @@ spring:
|
||||
max-file-size: 50MB
|
||||
max-request-size: 50MB
|
||||
mail:
|
||||
# host: smtp.qq.com
|
||||
host: smtp.126.com
|
||||
# host: smtp.qiye.163.com
|
||||
username: zhangqinlin@syxysoft.com
|
||||
|
||||
Reference in New Issue
Block a user