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
相关推荐
渲染101专业云渲染1 分钟前
川翔云电脑优势总结
服务器·3d·电脑·blender·maya
不想有bug的小菜鸟3 分钟前
vue3使用iframe全屏展示pdf效果
前端·pdf
m0_748238634 分钟前
Spring Boot项目接收前端参数的11种方式
前端·spring boot·后端
u0100559605 分钟前
前端代理,解决跨域问题讲解
前端
quitv10 分钟前
react脚手架配置别名
前端·javascript·react.js
m0_5287238118 分钟前
前端如何进行性能优化
前端·性能优化
chian-ocean19 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
化作繁星20 分钟前
在 Vue 3 中,如何缓存和复用动态组件
前端·vue.js·缓存
加油=^_^=21 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
Forget the Dream25 分钟前
设计模式之责任链模式
java·c++·设计模式·责任链模式