TypeScript
Hand-written, not generated. Typed template variables, a distinct error class per failure mode, and no required configuration beyond the key.
import { SadaSend } from 'sadasend';
const sada = new SadaSend(process.env.SADASEND_KEY!);
await sada.emails.send({
from: 'you@yourdomain.com',
to: 'user@example.com',
subject: 'Welcome aboard',
html: '<strong>It works.</strong>',
});Python
Generated from the published OpenAPI specification, so it stays in step with the API automatically.
from sadasend import SadaSend
sada = SadaSend(os.environ["SADASEND_KEY"])
sada.emails.send(
from_="you@yourdomain.com",
to="user@example.com",
subject="Welcome aboard",
html="<strong>It works.</strong>",
)What both ship with
- Automatic retry with exponential backoff on 5xx and 429, respecting Retry-After.
- Idempotency keys generated by default, so a retried send is never a duplicate email.
- A webhook signature verifier — everyone needs one, and getting it wrong is a security hole.
- Errors that name the fix. DomainNotVerifiedError carries the missing records.
SMTP
If you already have a working mailer, you do not need an SDK at all. Point it at the relay and change credentials rather than code.
host: smtp.sadasend.com
port: 587
security: STARTTLS
user: sadasend
pass: $SADASEND_KEY