Email SDK
- OhMyEmail(https://github.com/biezhi/oh-my-email)
Email配置
- 登录阿里云邮件推送控制台:https://dm.console.aliyun.com/
- nacos中joolun-upms-admin-dev.yml配置文件email:标签
#邮箱配置
email:
# 固定填smtpdm.aliyun.com
mailSmtpHost: smtpdm.aliyun.com
mailSmtpUsername: xxxxxxxxx
mailSmtpPassword: xxxxxxxxxxx
# 自己定义
siteName: JooLun
服务中使用
- 服务中引用
<!--email--> <dependency> <groupId>com.joolun</groupId> <artifactId>joolun-common-email</artifactId> </dependency> - 代码中使用
private final EmailUtils emailUtil; .... emailUtil.sendEmail(to, title, content);
