http://localhost:8080/swagger-ui.html#/email-controller
you can check example there
https://www.baeldung.com/spring-email#2-spring-boot-mail-server-properties
POST http://localhost:8080/emails
sample json input:
{
"subject": "Welcome",
"text": "How are you?",
"recipients": [
"[email protected]"
]
}
response:
{
"id": "5f0202f2c2f3ab3234d3bac6",
"subject": "Welcome",
"text": "How are you?",
"recipients": [
"[email protected]"
],
"attachments": [],
"emailStatus": "PENDING",
"priority": "LOWEST"
}
POST http://localhost:8080/emails/send/5f0202f2c2f3ab3234d3bac6
response:
{ "id": "5f0202f2c2f3ab3234d3bac6", "subject": "Welcome", "text": "How are you?", "recipients": [ "[email protected]" ], "attachments": [], "emailStatus": "SENT", "priority": "LOWEST" }
{ "subject": "Welcome", "text": "How are you?", "recipients": [ "[email protected]" ], "attachments": ["attachment.txt"] }
- HIGHEST
- HIGH
- MIDDLE
- LOW
- LOWEST
example:
POST http://localhost:8080/emails
{
"subject": "Welcome",
"text": "How are you?",
"recipients": [
"[email protected]"
],
"priority": "HIGHEST"
}
- Find all emails in the system
GET http://localhost:8080/emails - Find email by id
GET http://localhost:8080/emails/{id} - Check status of the email
GET http://localhost:8080/emails/{id}/status - Create new email
POST http://localhost:8080/emails - Update email
PUT http://localhost:8080/emails/{id} - Send email
POST http://localhost:8080/emails/send/{id} - Send all pending emails
POST http://localhost:8080/emails/send/all