Skip to content

Email

Planner uses Nodemailer for sending transactional emails via SMTP.

Architecture

  • Library: Nodemailer
  • Graceful fallback: if SMTP_HOST is not set, email sending is skipped with a log warning
  • Module: EmailModule@Global(), available in all services

Configuration

VariableDefaultDescription
SMTP_HOSTSMTP server (optional)
SMTP_PORT1025SMTP port
SMTP_USERSMTP user
SMTP_PASSSMTP password
SMTP_FROMnoreply@planner.appSender address

Email Templates

HTML templates are located in src/modules/email/templates/:

TemplatePurposeTrigger
password-resetPassword resetPOST /auth/forgot-password
invitationOrg/team invitationPOST /invitations (if user not registered)
task-assignedTask assignmentPATCH /projects/:id/tasks/:taskId (on assignee change)
comment-addedNew commentPOST /projects/:id/tasks/:taskId/comments
email-verificationEmail verificationPOST /auth/register

Usage

EmailService is an internal service called from:

  • AuthModule — verification email, password reset
  • InvitationsModule — email invitation
  • NotificationsModule — task and comment notifications