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,
});| Option | Default |
|---|---|
maxConnections | 5 |
maxMessages | 100 |
rateLimit | 1000 ms |