JooLun Plus 百科 ⬇ 源码下载

04.02 Email 邮件发送功能

JooLun 于 2026-10-21 14:40:14 +08:00 修改了此页面

Email SDK

Email配置

  • 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);