yookue / multiple-mail-spring-boot-starter

Multiple mail for spring boot starter

Home Page:https://mvnrepository.com/artifact/com.yookue.springstarter/multiple-mail-spring-boot-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Mail Spring Boot Starter

Spring Boot application integrates multiple mail quickly.

Quickstart

  • Import dependencies
    <dependency>
        <groupId>com.yookue.springstarter</groupId>
        <artifactId>multiple-mail-spring-boot-starter</artifactId>
        <version>LATEST</version>
    </dependency>

By default, this starter will auto take effect, you can turn it off by spring.multiple-mail.enabled = false

  • Configure Spring Boot application.yml with prefix spring.multiple-mail
spring:
    multiple-mail:
        primary:
            host: '192.168.0.1'
            port: 25
            username: 'foo1'
            password: 'bar1'
            properties:
        secondary:
            host: '192.168.0.2'
            port: 25
            username: 'foo2'
            password: 'bar2'
            properties:
        tertiary:
        quaternary:
        quinary:
        senary:

This starter supports 6 JavaMailSenderImpl at most.

  • Configure your beans with the following bean by @Autowired/@Resource annotation, combined with @Qualifier annotation (take primary as an example)
Bean Type Qualifier
JavaMailSenderImpl PrimaryMailSenderConfiguration.MAIL_SENDER

Document

Requirement

  • jdk 17+

License

This project is under the Apache License 2.0

See the NOTICE.txt file for required notices and attributions.

Donation

You like this package? Then donate to Yookue to support the development.

Website

About

Multiple mail for spring boot starter

https://mvnrepository.com/artifact/com.yookue.springstarter/multiple-mail-spring-boot-starter

License:Apache License 2.0


Languages

Language:Java 100.0%