Class
Sends email over SMTP with nodemailer.
The one transport the application uses, in every environment: Mailpit in development, Resend's SMTP relay (smtp.resend.com:465) in production. Only the settings differ, so the production path is the path that runs locally.
smtp.resend.com:465
const sender = new SmtpEmailSender({ host: "127.0.0.1", port: 1025, secure: false, from });await sender.send({ to, subject, html, text }); Copy
const sender = new SmtpEmailSender({ host: "127.0.0.1", port: 1025, secure: false, from });await sender.send({ to, subject, html, text });
Resolves Ok once the transport accepted the message, Err otherwise.
Ok
Err
Sends email over SMTP with nodemailer.
Remarks
The one transport the application uses, in every environment: Mailpit in development, Resend's SMTP relay (
smtp.resend.com:465) in production. Only the settings differ, so the production path is the path that runs locally.Example