antrix.dev
Ship Your Product · $79

Email with Resend

Send transactional and marketing emails with Resend. Welcome emails, receipts, and delivery — all automated.

Reading this alone?

Do it with peers — bi-weekly calls, $29/mo founding.

Join →

What it does

Resendis an email API for developers. It handles sending emails from your app — you call one function and the email goes out. No SMTP configuration, no mail server management, no deliverability tuning. You focus on what the email says and Resend handles getting it into inboxes.

There are two categories of email your app will send. Transactional emailsare triggered by user actions — welcome emails on signup, purchase receipts after checkout, password reset links, delivery instructions for digital products. These are one-to-one and time-sensitive. Marketing emailsare one-to-many — newsletters, product announcements, campaigns. Resend handles both.

Under the hood, Resend manages deliverability — the hard problem of getting your emails into inboxes instead of spam folders. It handles SPF and DKIM authentication automatically, provides analytics for opens, clicks, and bounces, and integrates natively with React through React Email so you can build templates as components instead of raw HTML strings.

Why we use it

The alternatives are painful. SendGridis complex and enterprise-focused — the dashboard alone has dozens of tabs you'll never touch. Mailgunis API-first but the developer experience feels dated, with verbose configuration and clunky SDKs. Resend is modern, built for developers who use React, and has the cleanest API in the space. One function call. That's it.

The free tier gives you 3,000 emails/month— enough to build your product, launch, and start generating revenue before you pay a cent. React Email lets you build templates with components you already know — no learning a new templating language. Deliverability works out of the box once you verify your domain. You won't outgrow the free tier until you have serious volume, and by then the upgrade is trivial.

Setup checklist

1

Create a Resend account

Go to resend.com and sign up. The free tier gives you 3,000 emails/month, 100 emails/day, 1 custom domain, and 1 API key. That's enough for all of development, your launch, and early traction — most apps don't send 100 emails a day until they have real paying customers. You can upgrade later when volume grows, but don't pay before you need to.

2

Verify your domain

Go to Domains > Add Domain in the Resend dashboard. Resend gives you 3 DNS records to add at your domain registrar: an SPF record, a DKIM record, and a verification TXTrecord. These prove to email providers that you're authorized to send from your domain.

Add all three records exactly as shown. Verification takes anywhere from 5 minutes to an hour depending on your registrar's DNS propagation speed. Without a verified domain, your emails will land in spam or get rejected entirely. This step is non-negotiable.

3

Get your API key

Go to API Keys > Create API Key. Give it a descriptive name (e.g., "production" or "development"). Copy the key immediately — you won't see it again after leaving the page. Add it to your .env.local file as RESEND_API_KEY. This key is server-side only — never expose it in client code or NEXT_PUBLIC_ variables.

4

Install the SDK

Run npm install resend in your project. Then create a Resend client file at lib/resend.ts. Import Resend from the package, initialize it with your API key from environment variables, and export the client. This gives you a typed client that handles authentication and request formatting for every email you send.

5

Build your first email template

You have two approaches for templates, and they're not mutually exclusive. HTML stringsare the simplest path — you write the HTML directly in a template literal, interpolate variables with `${name}`, and pass it to resend.emails.send(). This is fine for most projects, especially when starting out. No extra dependencies, no build step, just a function that returns HTML.

React Email is the more powerful approach. Install @react-email/components and build templates as React components using pre-built primitives like <Html>, <Section>, <Text>, and <Button>. These components handle the cross-client compatibility nightmares for you — they output the table-based HTML that email clients actually render correctly. Use render() to convert the component to an HTML string when sending. The advantage: your templates are type-safe, composable, and version-controlled alongside your app code.

For either approach, build templates that match your brand — dark backgrounds, your colors, your logo. Keep the layout simple. Email clients are not browsers — stick to tables for layout, inline styles, and basic HTML. Avoid CSS grid, flexbox, or anything fancy. Test how it renders before sending to customers.

6

Send your first email

Create a function that calls resend.emails.send() with four fields: from (must match your verified domain), to (the recipient), subject, and html(your template). Test it by sending to yourself. Check that it arrives, looks correct, and doesn't land in spam.

7

Set up transactional emails

Map out every email your app needs to send. Common ones: welcome email on signup, purchase confirmation after checkout, delivery instructions for digital products, password reset links. Each one is a function that builds the HTML with the relevant data (customer name, order details, reset link) and calls resend.emails.send().

Keep your email functions in a single file like lib/emails.ts so every email trigger in your app calls the same module. This makes it easy to update templates, change the from address, or add logging in one place.

8

Configure the "from" address

Use a professional format: "YourName <hello@yourdomain.com>" or "YourBrand <noreply@yourdomain.com>". The from address must match your verified domain exactly. If your verified domain is yourdomain.com, you can send from any address at that domain (hello@, support@, noreply@) without additional setup.

9

Handle errors and rate limits

Wrap every resend.emails.send()call in a try/catch. Emails can fail for many reasons — invalid addresses, rate limits, API outages. Log every failure. You need to know when emails don't send, because your customers won't tell you they didn't get a confirmation.

The free tier allows 10 emails per second. If you're doing bulk sends (like a newsletter), add delays between batches or use Resend's batch APIwhich handles throttling for you. For transactional emails (one at a time in response to user actions), you'll rarely hit rate limits.

10

Set up delivery tracking

Resend tracks opens and clicks automatically. View them in the dashboard under Emails. For programmatic tracking, set up webhooks at Resend > Webhooks to get notified of bounces and complaints.

Bounces and complaints directly affect your deliverability. If you keep sending to addresses that bounce, email providers will start flagging all your emails as spam. Use webhook events to automatically suppress bad addresses from future sends.

Pro tips

Use React Email for complex templates — install @react-email/components, build templates as React components, and render to HTML with render().

Preview templates locally — run npx react-email dev to see templates in the browser with hot reload as you edit.

Use the batch API for bulk sends resend.batch.send([...]) sends up to 100 emails in one call, handling throttling for you.

Monitor your domain reputation— high bounce rates damage deliverability for all your emails, not just the ones that bounced. Check the Resend dashboard regularly.

Send email code

// lib/resend.ts
import { Resend } from "resend";
const resend = new Resend(process.env.RESEND_API_KEY);

export async function sendWelcomeEmail(to: string, name: string) {
  try {
    const { data, error } = await resend.emails.send({
      from: "YourBrand <hello@yourdomain.com>",
      to,
      subject: `Welcome, ${name}!`,
      html: `<h1>Welcome aboard</h1><p>You're in. Here's what to do next...</p>`,
    });

    if (error) {
      console.error("Failed to send welcome email:", error);
      return { success: false, error };
    }

    return { success: true, id: data?.id };
  } catch (err) {
    console.error("Resend API error:", err);
    return { success: false, error: err };
  }
}

AI prompt to get started

I need to set up transactional emails with Resend for my Next.js app. Help me create: 1) A Resend client module, 2) HTML email templates for welcome, purchase confirmation, and password reset that match a dark theme with brand color #E8613C, 3) An API route that sends emails, 4) Error handling with retry logic.

Mistakes to avoid

  • Not verifying your domain — emails from unverified domains land in spam or get rejected entirely
  • Sending from a free email address (gmail, outlook) — always use your custom verified domain
  • Not handling send failures — wrap in try/catch, log errors, have a fallback. Silent failures mean customers never get their emails
  • Building complex email templates without testing — email clients render HTML differently than browsers. Test in Gmail, Outlook, and Apple Mail
  • Not setting up SPF/DKIM/DMARC — Resend handles SPF and DKIM, but add a DMARC record manually for maximum deliverability
  • Sending too many emails too fast — respect rate limits, use the batch API for bulk sends

Reading this and want to actually do it with others?

The community is bi-weekly live calls, async accountability, and a group of builders shipping in parallel. Founding seats are $29/mo.

The Community — Coming Soon

For AI-first operators who actually build the thing.

Builders, consultants, founders, freelancers — anyone whose income comes from shipping real work, not from selling courses about shipping.

AI isn't going to make you money. Products do. Clients do. Real businesses do. But AI is the unfair advantage — when you wire it into how you build, sell, and serve, you move 10x faster than people still doing it by hand.

Who it's for

Beginners

Learning AI from people actually using it, not just teaching it.

Builders

Ready to automate workflows — yours or your clients'.

Operators

Senior, deep in production, looking for peers and leverage.

You have real skills. You want AI as an unfair advantage on real work — building something of your own, leveling up at your job, or both — not another set of videos to watch.

What's inside

Direct access — me + the network

Bi-weekly Google Meet calls where we actually work. DMs and posts with me and other operators when you're mid-build and stuck.

  • Bi-weekly live calls — builds, Q&A, teardowns
  • Architecture + payment reviews on your code
  • Peer network of operators who actually ship
  • Paid client referrals when I'm overbooked

The production agentic stack

Everything I run on real client work and my own products — installed in your environment, not just shown in a video.

  • Antrix OS — the control room for your agent fleet
  • Installers: Ship Your Product + Run the Machine
  • ax-* skill packs (audit, deliver, simplify, content, more)
  • Multi-agent code review across parallel worktrees
  • Scheduled jobs, overnight pipelines, dual-AI planning
  • Setup library: Stripe, Supabase, Vercel, Resend

Antrix OS — the agent dashboard

Antrix OS — agent fleet dashboard

The control room I actually run my work from — every project, agent, skill, schedule, machine, and secret in one place. Members get the codebase.

Why this one is different

Most hosts make content.
I make products.

The platform doesn't matter — Skool, Circle, Discord, Whop, whatever. The problem is the host.

Most paid-community founders aren't shipping anything outside of the community itself. Their whole business is selling you the community.

I'm in production every day. The people I want next to me are too.

We level up together.

Most communities

  • Revenue IS the membership fee
  • Main output: content about the community
  • You learn from someone who only sells communities
  • Growth metric: new members

This community

  • Revenue is client work + products. Community is a side of it.
  • Main output: shipped code, deployed products, served clients
  • You learn from someone in production every single day
  • Growth metric: what members are actually shipping

Waitlist

Open · first cohort

Get in before the price moves.

Founding pricing exists for the first cohort. When it fills, the next one pays more — and joins behind it. Names get pulled in order.

  • Founding price locked: $29/mo
  • Bi-weekly live calls + brainstorms
  • Direct access: me + operator peers

Work with me directly

Senior engineering, paired with agentic AI.

I take a handful of clients each quarter. Direct work on your codebase, your stack, your business. No agency. No junior handoffs. You hire me, you get me.

I build with you

Pair sessions where we ship the product, the agent, or the integration that's been blocking you.

I wire AI into your business

Agentic workflows, multi-agent pipelines, and scheduled jobs that turn AI from a chat window into 10x leverage on actual revenue work.

I review what you shipped

Architecture, AI usage, payments. I'll tell you what's worth keeping, what to rip out, and what to ship next.

I set you up, you take it from there

Sometimes you don't need me to run it. You need someone in the room while you do. I'll show you the system.

Specialty — payments

Hundreds of millions processed across subscriptions, marketplaces, and migrations. If your product touches money, that's where I help most. Webhook reliability, marketplace splits, billing architectures — the kind of work where shipping wrong costs you money, not just time.

Tell me what you're building.

I reply within 24 hours.