跳至主要內容

邮件通知

yanhom邮件通知dynamictp小于 1 分钟

邮件通知

  1. 框架 core 模块默认集成企微、钉钉、飞书通知渠道,可直接使用,邮件通知需要单独引入下面依赖。

SpringBoot1x、2x 用此依赖

 <dependency>
     <groupId>org.dromara.dynamictp</groupId>
     <artifactId>dynamic-tp-spring-boot-starter-extension-notify-email</artifactId>
     <version>1.1.6.1</version>
 </dependency>   

SpringBoot3x 用此依赖

 <dependency>
     <groupId>org.dromara.dynamictp</groupId>
     <artifactId>dynamic-tp-spring-boot-starter-extension-notify-email</artifactId>
     <version>1.1.6.1-3.x</version>
 </dependency>
  1. 加入邮件相关配置
spring:
  # email notify configuration
  mail:
    # (optional) email subject, default:ThreadPool Notify
    title: ThreadPool Notify
    # mail service address
    host: smtp.qq.com
    port: 465
    # send from
    username: 123456@qq.com
    # authorization code eg: rlpadadtcugh4152e
    password: xxxxxxxxxxxxxxxx
    default-encoding: UTF-8
    properties:
      mail:
        smtp:
          socketFactoryClass: javax.net.ssl.SSLSocketFactory
          ssl:
            enable: true
        debug: false
  1. 效果图
email
email
上次编辑于:
贡献者: yanhom