Back to Spring Boot Admin

Mail Notifications

spring-boot-admin-docs/src/site/docs/02-server/notifications/notifier-mail.mdx

4.0.41.3 KB
Original Source

import metadata from "@sba/spring-boot-admin-server/target/classes/META-INF/spring-configuration-metadata.json"; import { PropertyTable } from "@sba/spring-boot-admin-docs/src/site/src/components/PropertyTable";

Mail Notifications

Mail notifications will be delivered as HTML emails rendered using Thymeleaf templates. To enable Mail notifications, configure a JavaMailSender using spring-boot-starter-mail and set a recipient.

<figure> ![mail-notification.png](mail-notification.png) <figcaption>Sample Mail Notification with default template</figcaption> </figure>

:::info To prevent disclosure of sensitive information, the default mail template doesn’t show any metadata of the instance. If you want to you show some of the metadata you can use a custom template. :::

xml

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-mail</artifactId>
</dependency>
properties
spring.mail.host=smtp.example.com
[email protected]

<PropertyTable title="Mail notifications configuration options" properties={metadata.properties} filter={['notify.mail']} includeOnly={true} />