mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
[DAT] 发送邮件实现方式再次修改
This commit is contained in:
@@ -3,7 +3,7 @@ package com.xboe.module.assistance.service;
|
|||||||
/**
|
/**
|
||||||
* SMTP邮件服务接口
|
* SMTP邮件服务接口
|
||||||
*/
|
*/
|
||||||
public interface ISmtpEmailService extends IEmailService {
|
public interface ISmtpEmailService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用SMTP直接发送邮件
|
* 使用SMTP直接发送邮件
|
||||||
|
|||||||
@@ -26,11 +26,6 @@ public class SmtpEmailServiceImpl implements ISmtpEmailService {
|
|||||||
private static final String SMTP_PORT = "465";
|
private static final String SMTP_PORT = "465";
|
||||||
private static final String SMTP_ENCRYPTION = "ssl";
|
private static final String SMTP_ENCRYPTION = "ssl";
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendMail(String to, String subject, String htmlMsg, String from) throws Exception {
|
|
||||||
sendMailBySmtp(to, subject, htmlMsg, from);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMailBySmtp(String to, String subject, String htmlMsg, String from) throws Exception {
|
public void sendMailBySmtp(String to, String subject, String htmlMsg, String from) throws Exception {
|
||||||
// 检查参数
|
// 检查参数
|
||||||
|
|||||||
@@ -1279,7 +1279,7 @@ public class CaseKnowledgeServiceImpl implements ICaseKnowledgeService {
|
|||||||
try {
|
try {
|
||||||
String to = String.join(",", recipients);
|
String to = String.join(",", recipients);
|
||||||
// emailService.sendMail(to, subject, content.toString(), null);
|
// emailService.sendMail(to, subject, content.toString(), null);
|
||||||
smtpEmailService.sendMail(to, subject, content.toString(), null);
|
smtpEmailService.sendMailBySmtp(to, subject, content.toString(), null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("发送接口调用失败告警邮件失败", e);
|
log.error("发送接口调用失败告警邮件失败", e);
|
||||||
}
|
}
|
||||||
@@ -1302,7 +1302,7 @@ public class CaseKnowledgeServiceImpl implements ICaseKnowledgeService {
|
|||||||
try {
|
try {
|
||||||
String to = String.join(",", recipients);
|
String to = String.join(",", recipients);
|
||||||
// emailService.sendMail(to, subject, content.toString(), null);
|
// emailService.sendMail(to, subject, content.toString(), null);
|
||||||
smtpEmailService.sendMail(to, subject, content.toString(), null);
|
smtpEmailService.sendMailBySmtp(to, subject, content.toString(), null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("发送业务处理失败告警邮件失败", e);
|
log.error("发送业务处理失败告警邮件失败", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user