Skip to content

Implement Mail Service — Welcome & Login Emails #21

@ayshadogo

Description

@ayshadogo

Description:

Use the existing Mail module to send emails to existing users:

  • Welcome Message for New User
  • Login Notification Email
  • Create a templates folder for email templates.

Tasks:

Create src/modules/mail/templates/

  • welcome.ejs
  • login.ejs
  • In src/modules/mail/mail.service.ts implement:
    • sendWelcomeEmail(user: { email; firstName?; username? })
    • sendLoginEmail(user: { email; firstName?; username? }, metadata?: { ip?: string; device?: string; time?: Date })
  • Load and render templates with variables (name, app name, date/time, optional device/IP).
  • Ensure mail configs (from env) are used (sender, subject prefixes).
  • Add graceful error handling and logging (no PII in logs).

Acceptance Criteria:

  • Sending welcome email renders the correct template and dispatches to the user’s email.
  • Sending login email renders the correct template with optional IP/device/time.
  • Uses env-driven sender & subjects.
  • Unit tests pass for template rendering and mail dispatch.
  • A screenshot of your 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