Sendr Docs
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.

  1. In the dashboard, go to Domains and click Add Domain
  2. Enter your domain (e.g., acme.com)
  3. Sendr generates three DNS records: SPF, DKIM, and DMARC
  4. Add all three records to your DNS provider (see Domain Setup guide for provider-specific instructions)
  5. Click Verify — Sendr checks your DNS records
  6. 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

  1. Go to API Keys in the dashboard
  2. Click New API Key
  3. Give it a name (e.g., "Development")
  4. Choose scope: sending_access for sending emails
  5. 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
  • Webhooksemail.opened, email.clicked events

To disable tracking for a specific email:

await sendr.emails.send({
  // ...
  tracking: false,
});

Common first-send errors

ErrorCauseFix
domain_not_verifiedSending from unverified domainVerify the domain or use a test-mode key
unauthorizedWrong or missing API keyCheck SENDR_API_KEY in your environment
validation_errorMissing required fieldsEnsure from, to, subject, and html/text are present
daily_limit_reachedFree plan 100 email/day limit hitWait until tomorrow or upgrade

Next steps

On this page