A Spring Boot email service that provides REST API endpoints for sending emails through Gmail SMTP.
[email protected]
email_password=your-gmail-app-password
auth.api=http://your-auth-service-url
./gradlew bootRun
POST /api/mail
Headers:
Authorization: Bearer <token>
Content-Type: application/json
Request:
{
"to": "[email protected]",
"subject": "Subject",
"content": "Email content"
}
Response: 201 Created
docker build -t mail-server .
docker run -p 8080:8080 -e email_username=... -e email_password=... mail-server