Skip to content

[BE-92] Consolidate the duplicate mail/ and email/ modules #1479

Description

@yusuftomilola

Overview

The backend has two overlapping email concerns: backend/src/mail/ (1 file) and backend/src/email/ (2 files, and EmailModule is the one registered in app.module.ts). Dependencies include @sendgrid/mail, nodemailer, nodemailer-mjml, mjml, and handlebars — more than one templating and transport path.

Tasks

  • Pick one module (email/, already registered) and one transport strategy; document why.
  • Move any unique logic out of mail/ and delete the directory.
  • Settle on a single template engine (MJML+Handlebars or plain Handlebars) and convert stragglers.
  • Provide one EmailService interface: send({ to, template, context }), with a dev transport that writes to disk/console instead of sending.
  • Remove now-unused mail dependencies from package.json.

Acceptance Criteria

  • Only one email module remains and every caller uses it.
  • Local development sends no real email by default.
  • Unused mail packages are removed from package.json.

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions