Guides

DKIM

Sign outgoing messages with RSA-SHA256 or Ed25519-SHA256.

The one rule

Keep the private key out of source control and publish the matching DNS record before sending.
import { signDKIM } from "sently/dkim";

const result = await signDKIM(rawMessage, {
  domainName: "example.com", keySelector: "2024", privateKey: process.env.DKIM_PRIVATE_KEY!,
});

SMTP configuration also accepts dkim.