https://github.com/andikscript/springsendemail
Simple send emails (gmail) via SMTP using the JavaMail Library on Spring Boot and use Rqueue with Redis for fast response when user request
https://github.com/andikscript/springsendemail
Last synced: 12 months ago
JSON representation
Simple send emails (gmail) via SMTP using the JavaMail Library on Spring Boot and use Rqueue with Redis for fast response when user request
- Host: GitHub
- URL: https://github.com/andikscript/springsendemail
- Owner: andikscript
- Created: 2022-08-08T03:43:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T09:36:32.000Z (over 3 years ago)
- Last Synced: 2025-01-30T00:41:20.724Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Send Email
Simple send emails (gmail) via SMTP using the JavaMail Library on Spring Boot and use Rqueue with Redis for fast response when user request
## How to use
### Setting username
- spring.mail.username=... -> on src/main/resources/application.properties with username gmail
### Setting password
- spring.mail.password=... -> on src/main/resources/application.properties with password generate gmail and need 2-step verification to be enabled for your account
```
Login to Gmail
-> Manage your Google Account
-> Security
-> App Passwords
-> Provide your login password
-> Select app with a custom name
-> Click on Generate
```
## API
Methods | Url | Action |
--- | --- | --- |
| POST | /api/email/sendMail | send email without attachment |
| POST | /api/email/sendMailAttach | send email with attachment |
## Format JSON Send
### Without Attachment
```
{
"received": [
"nameemail@gmail.com"
],
"subject": "subject",
"message": "message"
}
```
### With Attachment
```
{
"received": [
"nameemail1@gmail.com",
"nameemail2@gmail.com"
],
"subject": "subject",
"message": "message"
"attachment": "path location file"
}
```