From 4adb0063ef324e235218cc73eea63e39a6e8e59f Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Fri, 26 Aug 2022 18:44:55 +0800 Subject: [PATCH] 微调字段 --- snowy-base/snowy-core/src/main/java/vip/xiaonuo/core/email/modular/SimpleMailSender.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/snowy-base/snowy-core/src/main/java/vip/xiaonuo/core/email/modular/SimpleMailSender.java b/snowy-base/snowy-core/src/main/java/vip/xiaonuo/core/email/modular/SimpleMailSender.java index 109f798..715b9ce 100644 --- a/snowy-base/snowy-core/src/main/java/vip/xiaonuo/core/email/modular/SimpleMailSender.java +++ b/snowy-base/snowy-core/src/main/java/vip/xiaonuo/core/email/modular/SimpleMailSender.java @@ -28,6 +28,8 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.extra.mail.MailAccount; import cn.hutool.extra.mail.MailUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.Async; import vip.xiaonuo.core.email.MailSender; import vip.xiaonuo.core.email.modular.exception.MailSendException; import vip.xiaonuo.core.email.modular.model.SendMailParam; @@ -38,6 +40,7 @@ * @author xuyuxiang * @date 2020/6/9 22:54 */ +@Slf4j public class SimpleMailSender implements MailSender { /** @@ -60,13 +63,16 @@ } @Override + @Async public void sendMailHtml(SendMailParam sendMailParam) { - + log.info("邮件发送.."); //校验发送邮件的参数 assertSendMailParams(sendMailParam); //spring发送邮件 MailUtil.send(mailAccount, CollUtil.newArrayList(sendMailParam.getTo()), sendMailParam.getTitle(), sendMailParam.getContent(), true); + log.info("邮件发送完成.."); + } /** -- Gitblit v1.9.1