inleft
2022-08-21 7fe1bd7734e8a1f80523d5fce34290e3f20a7403
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("邮件发送完成..");
    }
    /**