Email
Planner uses Nodemailer for sending transactional emails via SMTP.
Architecture
- Library: Nodemailer
- Graceful fallback: if
SMTP_HOSTis not set, email sending is skipped with a log warning - Module:
EmailModule—@Global(), available in all services
Configuration
| Variable | Default | Description |
|---|---|---|
SMTP_HOST | — | SMTP server (optional) |
SMTP_PORT | 1025 | SMTP port |
SMTP_USER | — | SMTP user |
SMTP_PASS | — | SMTP password |
SMTP_FROM | noreply@planner.app | Sender address |
Email Templates
HTML templates are located in src/modules/email/templates/:
| Template | Purpose | Trigger |
|---|---|---|
password-reset | Password reset | POST /auth/forgot-password |
invitation | Org/team invitation | POST /invitations (if user not registered) |
task-assigned | Task assignment | PATCH /projects/:id/tasks/:taskId (on assignee change) |
comment-added | New comment | POST /projects/:id/tasks/:taskId/comments |
email-verification | Email verification | POST /auth/register |
Usage
EmailService is an internal service called from:
- AuthModule — verification email, password reset
- InvitationsModule — email invitation
- NotificationsModule — task and comment notifications