配置邮箱通知

引入依赖到 server 端:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

 

编写 server 端的 application.yml 配置:

spring:
  mail:
    # 网易邮箱服务地址
    host: smtp.163.com
    # 网易邮箱账号
    username: xxx@163.com
    # 授权码
    password: xxx
    default-encoding: UTF-8
  boot:
    admin:
      notify:
        mail:
          # 接收人列表(用逗号隔开)
          to: xxx@163.com
          # 发送人信息
          from: xxx@163.com
          # 启动通知
          enabled: true
          # 忽略应用上线状态
          ignore-changes: {"UNKNOWN:UP"}

 

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-11-27
  • 2021-07-27
  • 2021-09-12
  • 2021-07-27
  • 2021-08-01
猜你喜欢
  • 2021-06-02
  • 2021-07-20
  • 2022-12-23
  • 2021-11-12
  • 2021-10-28
  • 2021-06-18
相关资源
相似解决方案