# Mail Server A Spring Boot email service that provides REST API endpoints for sending emails through Gmail SMTP. ## Setup ### Prerequisites - Java 25 - Gmail account with app-specific password ### Environment Variables ```bash email_username=your-gmail@gmail.com email_password=your-gmail-app-password auth.api=http://your-auth-service-url ``` ### Run ```bash ./gradlew bootRun ``` ## API ### Send Email **POST** `/api/mail` Headers: ``` Authorization: Bearer Content-Type: application/json ``` Request: ```json { "to": "recipient@example.com", "subject": "Subject", "content": "Email content" } ``` Response: 201 Created ## Docker ```bash docker build -t mail-server . docker run -p 8080:8080 -e email_username=... -e email_password=... mail-server ```