SpringBoot 实现发送邮件
环境:
SpringBoot +maven
依赖:
配置:
yml文件配置:(不配置会导致 JavaMailSender自动注入失败)
代码实现:
public void sendHtmlMail(String from ,String to, String subject, String content) throws MessagingException {
MimeMessage message = mailSender.createM...
原创
2020-09-10 13:53:34 ·
140 阅读 ·
0 评论