[修改]发送邮件

This commit is contained in:
sunzheng
2024-01-15 17:57:23 +08:00
parent 5e451afc66
commit 56bea7bbaa
2 changed files with 13 additions and 12 deletions
@@ -121,18 +121,18 @@ public class SendMessageServiceImpl implements SendMessageService {
} }
email = PasswordUtil.decrypt(email); email = PasswordUtil.decrypt(email);
emailPassword = PasswordUtil.decrypt(emailPassword); emailPassword = PasswordUtil.decrypt(emailPassword);
//EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword); EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
//// 发送带附件邮箱 // 发送带附件邮箱emailPassword = "wflwijcpdmwvcihc"
// if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){ if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
// emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile()); emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
// }else{ }else{
// //如果有通知内容就替换 //如果有通知内容就替换
// if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){ if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice()); emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
// }else { }else {
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content); emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
// } }
// } }
}catch (Exception e){ }catch (Exception e){
log.error("发送邮件异常",e); log.error("发送邮件异常",e);
if (e.getMessage() !=null){ if (e.getMessage() !=null){
@@ -25,6 +25,7 @@ spring:
max-file-size: 50MB max-file-size: 50MB
max-request-size: 50MB max-request-size: 50MB
mail: mail:
# host: smtp.qq.com
host: smtp.126.com host: smtp.126.com
# host: smtp.qiye.163.com # host: smtp.qiye.163.com
username: zhangqinlin@syxysoft.com username: zhangqinlin@syxysoft.com