Tendkit

Search documentation

Find a docs page

Get Started

Resend

Send with Resend and receive on a Resend receiving domain.

Install

Terminal
npx shadcn@latest add @tendkit/channel-resend

It lands in lib/support/channels/. Import resendChannel from there.

Set up

  1. Verify your sending domain

    In Resend, verify acme.com so replies go out from support@acme.com.

  2. Add a receiving domain

    Add in.acme.com with receiving on, and its MX record in your DNS. To keep your mailbox, copy support@acme.com to support@in.acme.com (see Email setup).

  3. Create a full access API key

    Reading received mail needs more than a sending-only key.

  4. Add the webhook

    Point it at /api/webhooks/support/email with email.received, email.sent, email.delivered, email.bounced, email.failed, email.suppressed and email.complained, and pass its signing secret as webhookSecret.

Configure

lib/support/index.ts
resendChannel({
  id: "email",
  apiKey: process.env.RESEND_API_KEY!,
  webhookSecret: process.env.RESEND_WEBHOOK_SECRET!,
  address: "support@acme.com",
  replyAddress: "support@in.acme.com",
  receivingDomains: ["in.acme.com"],
})

Options

NameTypeDescription
id*stringStable channel id, stored on every ticket and used in the webhook URL. Never change it.
apiKey*stringA full access key.
webhookSecret*stringThe webhook's signing secret, "whsec_…".
address*stringWhat customers write to and replies are sent from.
replyAddress*stringAn address on your Resend receiving domain.
receivingDomainsstring[]Only accept mail addressed to these domains. Set it when several products share one Resend account.
fetch / baseUrlFor tests and proxies.

Behaviour

  • Delivery, bounce and complaint events update each reply's status, and failures notify your team.
  • Threading headers are read from the raw message, so they work even when the API omits them.