Skip to content

Implement Welcome & Login Email Notifications via Mail Module #22

@ayshadogo

Description

@ayshadogo

Description:

Use the existing Mail module to send emails when a user Registers or Logs In:

Welcome Email for new users
Login Notification Email
Add email templates folder

Tasks:

  • Create src/modules/mail/templates/
    welcome.ejs
    login.ejs

  • Update src/modules/mail/mail.service.ts:

    sendWelcomeEmail(user: { email; firstName?; username? })
    sendLoginEmail(user: { email; firstName?; username? }, metadata?: { ip?: string; device?: string; time?: Date })

  • Details:

    • Load & render templates with variables (name, app name, date/time, optional device/IP)
    • Use env mail configs (sender, subject prefix)
    • Add error handling + logging (no PII)
    • Trigger welcome email on registration, login email on successful login

Acceptance Criteria:

  • Welcome email renders correct template & sends on registration
  • Login email renders correct template with optional IP/device/time
  • Uses env-driven sender & subjects
  • Unit tests pass for template rendering + mail dispatch
  • Screenshot of server running

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions