平台集成了邮件处理包:
<dependency>
<groupId>org.qlm</groupId>
<artifactId>qlm-utils-email</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
需要在nacos中配置:
email:
smtp:
pop3:
starttls:
debug: true
address:
user:
password:
例如邮件
MailVO mailVO=new MailVO();
mailVO.setToMails("接收人");
mailVO.setSubject("标题");
mailVO.setContent("内容");
EmailUtils.sendMail(mailVO);