Send with Resend and receive on a Resend receiving domain.
Install
Terminal
npx shadcn@latest add @tendkit/channel-resendIt lands in lib/support/channels/. Import resendChannel from there.
Set up
Verify your sending domain
In Resend, verify
acme.comso replies go out fromsupport@acme.com.Add a receiving domain
Add
in.acme.comwith receiving on, and its MX record in your DNS. To keep your mailbox, copysupport@acme.comtosupport@in.acme.com(see Email setup).Create a full access API key
Reading received mail needs more than a sending-only key.
Add the webhook
Point it at
/api/webhooks/support/emailwithemail.received,email.sent,email.delivered,email.bounced,email.failed,email.suppressedandemail.complained, and pass its signing secret aswebhookSecret.
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
| Name | Type | Description |
|---|---|---|
id* | string | Stable channel id, stored on every ticket and used in the webhook URL. Never change it. |
apiKey* | string | A full access key. |
webhookSecret* | string | The webhook's signing secret, "whsec_…". |
address* | string | What customers write to and replies are sent from. |
replyAddress* | string | An address on your Resend receiving domain. |
receivingDomains | string[] | Only accept mail addressed to these domains. Set it when several products share one Resend account. |
fetch / baseUrl | | For 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.