Skip to content

Implement Nodemailer Email Service for Welcome, Verification Complete, and Risk Alert Notifications #224

@mftee

Description

@mftee

Description:
Implement a standalone mail service using Nodemailer that can send transactional emails (welcome, verification complete, risk alert).

Tasks:

  • Create src/mail/mail.module.ts and mail.service.ts
  • Configure a Nodemailer transport using MAIL_HOST, MAIL_PORT, MAIL_USER, MAIL_PASSWORD, MAIL_FROM from ConfigService
  • Implement sendWelcome(to: string, name: string): Promise<void>
  • Implement sendVerificationComplete(to: string, documentTitle: string, txHash: string): Promise<void>
  • Implement sendRiskAlert(to: string, documentTitle: string, flags: string[]): Promise<void>
  • Use simple inline HTML templates (no external templating engine required)

Acceptance Criteria:

  • All three email methods send without error when SMTP credentials are valid
  • Missing SMTP config causes the app to log a warning but not crash (graceful degradation)
  • Emails contain the relevant data passed in the method arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions