SpringBootAdmin设置邮件通知

如果你想要在Spring Boot Admin中配置邮件通知,可以按照以下步骤进行操作:

添加邮件通知的依赖

复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>

配置收件人

application.yml 文件

这些配置项包括邮件通知的启用状态 (enabled)、收件人 (to)、发件人 (from)、SMTP 服务器信息 (hostport)、认证信息 (usernamepassword),以及协议和其他 SMTP 属性。请替换示例中的占位符和值为你的实际信息。

复制代码
server:
  port: 8070
  servlet:
    context-path: /
# email
spring:
  mail:
    # 配置邮箱 smtp 地址(qq 发送邮箱的固定 host 是 smtp.qq.com)
    host: smtp.qq.com
    # 你的邮箱
    username: xxxxx@qq.com
    # 你的授权码
    password: kpddccybsvqfibbb
    default-encoding: UTF-8
  boot:
    admin:
      notify:
        mail:
          # 开启
          enabled: true
          # 接收人
          to: 872268102@qq.com, 563053676@qq.com, 354200205@qq.com
          # 发送人
          from: 1345592047@qq.com
          # ????????
          ignore-changes: {"UNKNOWN:UP"}
      #你的地址
      ui:
        public-url: http://xxx.xxx.com:80
application.properties
复制代码
# 邮件通知配置
spring.boot.admin.notify.mail.enabled=true
spring.boot.admin.notify.mail.to=recipient@example.com
spring.boot.admin.notify.mail.from=sender@example.com
spring.boot.admin.notify.mail.host=smtp.example.com
spring.boot.admin.notify.mail.port=587
spring.boot.admin.notify.mail.username=your_username
spring.boot.admin.notify.mail.password=your_password
spring.boot.admin.notify.mail.protocol=smtp
spring.boot.admin.notify.mail.properties.mail.smtp.auth=true
spring.boot.admin.notify.mail.properties.mail.smtp.starttls.enable=true
spring.boot.admin.notify.mail.properties.mail.smtp.starttls.required=true
相关推荐
Luna-player4 分钟前
前端中stylus是干嘛用的
前端·css·stylus
0和1的舞者16 分钟前
高并发论坛系统:单元测试 + 接口自动化 + 性能测试 + CI/CD 全链路测试报告
java·测试开发·测试工具·jmeter·pytest·测试·测试报告
CHQIUU20 分钟前
解决 npm 全局安装 EACCES 权限问题(macOS 篇)
前端·macos·npm
程序员鱼皮21 分钟前
OpenClaw接入飞书保姆级教程,几分钟搞定手机养龙虾!
前端·人工智能·后端
紫_龙38 分钟前
最新版vue3+TypeScript开发入门到实战教程之vue3与vue2语法优劣对比
前端·javascript·typescript
空空kkk1 小时前
Java基础——代理
java·开发语言
野生技术架构师1 小时前
互联网大厂必备 Java 面试八股文真题解析
java·开发语言·面试
Rsun045511 小时前
synchronized关键字的底层实现
java
老约家的可汗1 小时前
C++篇之类和对象下
java·开发语言·c++
SouthRosefinch1 小时前
一、HTML简介与开发环境
开发语言·前端·html