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: [email protected]
    # 你的授权码
    password: kpddccybsvqfibbb
    default-encoding: UTF-8
  boot:
    admin:
      notify:
        mail:
          # 开启
          enabled: true
          # 接收人
          to: [email protected], [email protected], [email protected]
          # 发送人
          from: [email protected]
          # ????????
          ignore-changes: {"UNKNOWN:UP"}
      #你的地址
      ui:
        public-url: http://xxx.xxx.com:80
application.properties
复制代码
# 邮件通知配置
spring.boot.admin.notify.mail.enabled=true
[email protected]
[email protected]
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
相关推荐
LuckyLay1 小时前
Vue百日学习计划Day9-15天详细计划-Gemini版
前端·vue.js·学习
Java致死2 小时前
设计模式Java
java·开发语言·设计模式
源码方舟2 小时前
SpringBoot + Shiro + JWT 实现认证与授权完整方案实现
java·spring boot·后端
2401_cf5 小时前
为什么hadoop不用Java的序列化?
java·hadoop·eclipse
帮帮志5 小时前
idea整合maven环境配置
java·maven·intellij-idea
LuckyTHP5 小时前
java 使用zxing生成条形码(可自定义文字位置、边框样式)
java·开发语言·python
厦门辰迈智慧科技有限公司6 小时前
城市排水管网流量监测系统解决方案
运维·服务器
水银嘻嘻7 小时前
12 web 自动化之基于关键字+数据驱动-反射自动化框架搭建
运维·前端·自动化
小嘟嚷ovo7 小时前
h5,原生html,echarts关系网实现
前端·html·echarts
十一吖i8 小时前
Vue3项目使用ElDrawer后select方法不生效
前端