[DAT] 发送邮件实现方式再次修改

This commit is contained in:
liu.zixi
2025-10-21 11:53:17 +08:00
parent 079b64d0fd
commit 42946fed80
3 changed files with 3 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ package com.xboe.module.assistance.service;
/** /**
* SMTP邮件服务接口 * SMTP邮件服务接口
*/ */
public interface ISmtpEmailService extends IEmailService { public interface ISmtpEmailService {
/** /**
* 使用SMTP直接发送邮件 * 使用SMTP直接发送邮件

View File

@@ -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 {
// 检查参数 // 检查参数

View File

@@ -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);
} }