springboot admin 邮箱

配置邮箱通知

引入依赖到 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"}
原文地址:https://www.cnblogs.com/ooo0/p/14435497.html