Daniel Bohry 3 săptămâni în urmă
părinte
comite
db4dc21ccc
1 a modificat fișierele cu 50 adăugiri și 0 ștergeri
  1. 50 0
      README.md

+ 50 - 0
README.md

@@ -0,0 +1,50 @@
+# 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 <token>
+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
+```