Guides

SMTP pooling

Reuse SMTP connections and apply shared rate limits.

The one rule

Enable pooling only for a long-lived process that sends more than one message.
import { createSMTPMailer } from "sently/smtp";

const mailer = await createSMTPMailer({
  host: "smtp.example.com", pool: true, maxConnections: 5, maxMessages: 100,
});
OptionDefault
maxConnections5
maxMessages100
rateLimit1000 ms