Skip to main content
nestrs-mail sends templated email through a pluggable MailTransport. The built-in renderer escapes {{placeholders}} (XSS-safe for HTML bodies). Tests use InMemoryMailTransport; production can use SMTP or HTTP providers (SES/Resend-style) behind the http feature.

Install

Register and send

MailMessage

Transports

  • InMemoryMailTransport — inbox() / clear() for tests and the lab
  • HttpMailTransport (feature http) — POST JSON to an HTTP API with bearer auth

Security

Never concatenate untrusted input into HTML without render_template. Pin HTTP destinations (SSRF). See security notes.

See also