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