Guides
Sending Your First Email
A step-by-step walkthrough of sending your first email with Sendr.
This guide walks through everything from account setup to confirmed delivery.
Step 1: Create an account
Sign up at app.sendr.dev. Your account starts on the Free plan — no credit card required.
Step 2: Add and verify a domain
You need a verified domain before sending live emails.
- In the dashboard, go to Domains and click Add Domain
- Enter your domain (e.g.,
acme.com) - Sendr generates three DNS records: SPF, DKIM, and DMARC
- Add all three records to your DNS provider (see Domain Setup guide for provider-specific instructions)
- Click Verify — Sendr checks your DNS records
- Wait for status to show Verified (usually 2–10 minutes)
During development, skip this step by using a test-mode API key — it bypasses verification.
Step 3: Create an API key
- Go to API Keys in the dashboard
- Click New API Key
- Give it a name (e.g., "Development")
- Choose scope:
sending_accessfor sending emails - Copy the key immediately — it won't be shown again
Store it in your environment:
# .env
SENDR_API_KEY=sndr_live_your_key_here
Step 4: Install the SDK
npm install sendr
Step 5: Send your first email
import { Sendr } from "sendr";
const sendr = new Sendr(process.env.SENDR_API_KEY!);
const email = await sendr.emails.send({
from: "hello@acme.com", // Must be from your verified domain
to: "you@yourpersonal.com", // Your own inbox to test
subject: "My first Sendr email",
html: `
<div style="font-family: sans-serif; max-width: 600px; margin: 0 auto;">
<h1>It works!</h1>
<p>This email was sent via the Sendr API.</p>
</div>
`,
});
console.log("Sent! Email ID:", email.id);
Run it:
npx tsx send.ts
Step 6: Confirm delivery
// Check status after a few seconds
const result = await sendr.emails.get(email.id);
console.log("Status:", result.status); // "delivered"
console.log("Sent at:", result.sent_at);
Or check the Emails section in the dashboard for real-time status.
Step 7: Set up tracking (optional)
Tracking is enabled by default. Open and click events appear in:
- Analytics → delivery rates and open rates
- Webhooks →
email.opened,email.clickedevents
To disable tracking for a specific email:
await sendr.emails.send({
// ...
tracking: false,
});
Common first-send errors
| Error | Cause | Fix |
|---|---|---|
domain_not_verified | Sending from unverified domain | Verify the domain or use a test-mode key |
unauthorized | Wrong or missing API key | Check SENDR_API_KEY in your environment |
validation_error | Missing required fields | Ensure from, to, subject, and html/text are present |
daily_limit_reached | Free plan 100 email/day limit hit | Wait until tomorrow or upgrade |
Next steps
- Authentication — scope your API keys correctly
- Templates — reusable HTML templates
- Webhooks — receive delivery events
- Analytics — track performance