Skip to content

vitoriadeveloper/send-email-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Email Service - AWS SES

Email sending service using AWS Simple Email Service (SES) with Spring Boot and AWS SDK v2.


Description 🔗

This service allows you to send emails programmatically using AWS SES. It's built with a modular architecture and utilizes Spring Boot dependecy injection. The service supports:

  • Sender and recipient configuration.
  • Plain text email body.
  • AWS region and credentials configuration via application.properties or environment variables.

Requirements ⚙

  • Java 21+.
  • Maven.
  • AWS account with SES enabled.
  • E-mail(s) verified in SES (sandbox or production).
  • Spring Boot 3.5.6+

📌 Endpoints

➕ Send email

POST /send-email Request Body (JSON):

{
	"to": "teste@gmail.com",
	"subject":"teste aws ses",
	"body": "Hello from test"
}

Folder architecture 📁

email-service/
│
├─ src/
│   ├─ main/
│   │   ├─ java/
│   │   │   └─ com/
│   │   │       └─ vitoriadeveloper/
│   │   │           └─ emailservice/
│   │   │               ├─ core/
│   │   │               │   └─ exceptions/
│   │   │               │       └─ EmailServiceException.java
│   │   │               │   └─ EmailRequest.java
│   │   │               │   └─ EmailSenderUseCase.java
│   │   │               │
│   │   │               ├─ application/
│   │   │               │   └─ EmailSenderService.java
│   │   │               │
│   │   │               ├─ adapters/       # input and outputs
│   │   │               │   └─ EmailSenderGateway.java     # Interface 
│   │   │               │
│   │   │               ├─ infra/
│   │   │               │   ├─ aws/
│   │   │               │   │   ├─ AwsConfig.java          # SES Bean
│   │   │               │   ├─ ses/
│   │   │               │   │   └─ SesEmailSender.java     # implementing  SES
│   │   │               │
│   │   │               └─ controllers/
│   │   │                   └─ EmailSenderController.java  # Endpoint REST



Technologies

Minhas Habilidades

About

Sending email using AWS SES

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages