https://github.com/jayemscript/nestjs-mailer-worker
A standalone NestJS email microservice with multi-provider support, template management, email logging, queue processing, and delivery tracking.
https://github.com/jayemscript/nestjs-mailer-worker
bullmq email-logging email-templates google-workspace mailer microservice microsoft365 nestjs postgresql queue redis smtp typeorm typescript
Last synced: about 18 hours ago
JSON representation
A standalone NestJS email microservice with multi-provider support, template management, email logging, queue processing, and delivery tracking.
- Host: GitHub
- URL: https://github.com/jayemscript/nestjs-mailer-worker
- Owner: jayemscript
- Created: 2026-06-06T10:23:14.000Z (14 days ago)
- Default Branch: main
- Last Pushed: 2026-06-06T10:25:56.000Z (14 days ago)
- Last Synced: 2026-06-06T12:13:48.333Z (14 days ago)
- Topics: bullmq, email-logging, email-templates, google-workspace, mailer, microservice, microsoft365, nestjs, postgresql, queue, redis, smtp, typeorm, typescript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NestJS Mailer Worker
A standalone email microservice built with **NestJS**, **TypeORM**, and **PostgreSQL**.
Designed for applications that need a centralized email infrastructure with support for multiple email providers, custom templates, email logging, queue processing, and future extensibility.
## Overview
NestJS Mailer Worker is a dedicated email service that can be deployed independently from your main application.
Instead of sending emails directly from your API, applications can publish email jobs to this service, allowing reliable, scalable, and observable email delivery.
---
## Features
### Multi-Provider Support
Send emails using different providers:
* SMTP
* Gmail
* Google Workspace
* Microsoft 365
* Outlook
* Custom SMTP Providers
* Future provider integrations
---
### Custom Email Templates
Create and manage:
* HTML emails
* Plain text emails
* Dynamic variables
* Reusable templates
* Provider-independent templates
Example:
```html
Welcome {{name}}
Your account has been created successfully.
```
---
### Email Queue Processing
Background email processing using queues.
Benefits:
* Faster API responses
* Retry support
* Failure handling
* High-volume email delivery
---
### Email Logging
Track every email sent.
Store:
* Recipient
* Subject
* Provider
* Status
* Error messages
* Timestamp
---
### Delivery Tracking
Monitor email lifecycle:
* Pending
* Processing
* Sent
* Failed
* Retried
---
### REST API Support
Trigger emails via HTTP endpoints.
Example:
```http
POST /emails/send
```
---
### Database Persistence
Powered by PostgreSQL and TypeORM.
Store:
* Templates
* Provider configurations
* Email logs
* Delivery history
---
### Modular Architecture
Built with NestJS modules.
Easy to extend:
* Add new providers
* Add webhooks
* Add analytics
* Add dashboards
* Add notification channels
---
## Technology Stack
* NestJS
* TypeScript
* TypeORM
* PostgreSQL
* BullMQ (optional)
* Redis (optional)
---
## Use Cases
* User registration emails
* Password reset emails
* Verification emails
* Notifications
* Marketing campaigns
* Transactional emails
* Internal system alerts
---
## Future Roadmap
* [ ] Provider failover support
* [ ] Email analytics
* [ ] Open tracking
* [ ] Click tracking
* [ ] Webhook integrations
* [ ] Template editor
* [ ] Admin dashboard
* [ ] Multi-tenant support
* [ ] Rate limiting
* [ ] Scheduled emails
---
## Why Use This?
Many applications need email capabilities but don't want email logic mixed into the main API.
NestJS Mailer Worker provides a dedicated service responsible for:
* Email delivery
* Provider management
* Logging
* Monitoring
* Reliability
This keeps your core application clean while providing a scalable email infrastructure.
## License
MIT