Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jiangtj/mail-sender
:envelope: A lighted mail sender based on spring boot
https://github.com/jiangtj/mail-sender
Last synced: about 1 month ago
JSON representation
:envelope: A lighted mail sender based on spring boot
- Host: GitHub
- URL: https://github.com/jiangtj/mail-sender
- Owner: jiangtj
- License: agpl-3.0
- Created: 2019-09-12T05:51:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T21:37:49.000Z (over 1 year ago)
- Last Synced: 2023-02-27T02:46:37.161Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Mail Sender
轻量的邮件发送服务(正在积极开发中)
## Design
![image](https://user-images.githubusercontent.com/15902347/64757270-2b374880-d564-11e9-9a36-d319f7aad1b1.png)
修改:
1. 使用freemarker代替thymeleaf:thymeleaf与web容器强绑定,不是很优雅
## How to use
你需要提供一份邮箱的配置,详细见[MailProperties](https://github.com/spring-projects/spring-boot/blob/v2.1.8.RELEASE/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mail/MailProperties.java)
例如:添加application-mail.properties
```properties
spring.mail.host=smtp.office365.com
spring.mail.port=587
spring.mail.username=******
spring.mail.password=******
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
```### docker
```shell
docker run --name mail-sender -p 9898:9898 --restart unless-stopped \
-e SPRING_MAIL_HOST=smtp.office365.com \
-e SPRING_MAIL_PORT=587 \
-e SPRING_MAIL_USERNAME=****** \
-e SPRING_MAIL_PASSWORD=****** \
-e SPRING_MAIL_PROPERTIES_MAIL_SMTP_AUTH=true \
-e SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=true \
-e SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_REQUIRED=true \
-d jiangtj/mail-sender:latest
```