Skip to content

Commit 8d86a0d

Browse files
Merge pull request #37 from aptlogica/update-readme
update readme
2 parents 5e1211a + 4d80d2c commit 8d86a0d

1 file changed

Lines changed: 47 additions & 4 deletions

File tree

README.md

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
**sereni-email-smtp** is an open-source, self-hosted SMTP email service and developer email API built for backend applications. It enables reliable delivery of transactional emails such as verification emails, password resets, alerts, and notifications using queueing, retry logic, and observability features. Designed for scalability and flexibility, it integrates easily with REST APIs, microservices, and popular SMTP providers like Gmail, SendGrid, and Mailgun.
3030

31+
sereni-email-smtp runs on <code>:8082</code> as part of the SereniBase backend platform. SereniBase uses this service for user registration emails, password resets, and workflow notifications. See <a href="https://github.com/aptlogica/sereni-base">sereni-base</a> to deploy the full stack.</p>
3132
## Key Features
3233

3334
- **Enterprise SMTP Service**: High-throughput email delivery with advanced error handling
@@ -124,14 +125,56 @@ SMTP_PASSWORD=your-app-password
124125
REDIS_URL=redis://localhost:6379
125126
PORT=8080
126127
LOG_LEVEL=debug
128+
129+
# Queue & retry settings
130+
# Maximum times a message will be retried before moving to dead-letter queue
131+
MAX_RETRY_ATTEMPTS=3
132+
# Base backoff in seconds used for exponential backoff between retries
133+
RETRY_BACKOFF_SECONDS=30
134+
# Number of consecutive failures before a circuit breaker trips
135+
CIRCUIT_BREAKER_THRESHOLD=5
136+
# Dead letter queue name (Redis key / stream / list depending on implementation)
137+
DEAD_LETTER_QUEUE=sereni:email:dlq
138+
139+
# Priority queue names
140+
EMAIL_PRIORITY_HIGH=sereni:email:high
141+
EMAIL_PRIORITY_NORMAL=sereni:email:normal
127142
```
128143

129144
### Docker Development
130-
```bash
131-
# Start with dependencies
132-
docker-compose up -d redis
133145

134-
# Run the service
146+
Use the example `docker-compose.yml` below to run Redis and the email service together. The `email` service is configured to connect to Redis using `REDIS_URL=redis://redis:6379` and exposes port `8082`.
147+
148+
```yaml
149+
version: "3.8"
150+
services:
151+
redis:
152+
image: redis:7-alpine
153+
ports:
154+
- "6379:6379"
155+
volumes:
156+
- redis-data:/data
157+
158+
email:
159+
build: .
160+
environment:
161+
- REDIS_URL=redis://redis:6379
162+
- PORT=8082
163+
- LOG_LEVEL=debug
164+
ports:
165+
- "8082:8082"
166+
depends_on:
167+
- redis
168+
169+
volumes:
170+
redis-data:
171+
```
172+
173+
Start the stack:
174+
175+
```bash
176+
docker-compose up -d
177+
# Run the service locally (or build the image to run the `email` service)
135178
go run ./cmd/server
136179
```
137180

0 commit comments

Comments
 (0)