Skip to content

basalt / mailer-smtp/src / smtpMailer

Function: smtpMailer() ​

> smtpMailer(options): SmtpMailDriver

Defined in: mailer-smtp/src/index.ts:48

An SMTP driver ready for mailerPlugin({ driver }).

ts
mailerPlugin({ driver: smtpMailer({ url: 'smtp://localhost:1025' }) })   // Mailpit
mailerPlugin({ driver: smtpMailer({ url: process.env.SMTP_URL! }) })

The driver: 'smtp' shorthand this replaces lived in the core, which is why @basaltkit/mailer depended on nodemailer and shipped it to every app — including those sending through Resend, SES or Mailgun, which are plain HTTP APIs and need no SMTP client at all.

Parameters ​

options ​

SmtpDriverOptions

Returns ​

SmtpMailDriver

Released under the MIT License.