Menu

Receive inbound email in Next.js with a webhook
πŸ“°

Receive inbound email in Next.js with a webhook

DEV Community: nextjsΒ·ReceiveHQΒ·1 day ago
#edh4wZA2
#devtonextjs#devto#dev#string#receivehq
Long article (897 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Receive inbound email in Next.js with a webhook

This guide wires a Next.js App Router route to ReceiveHQ so inbound mail on your domain arrives as JSON. ReceiveHQ posts a Postmark-format body ( application/json ) when the endpoint's payloadFormat is postmark β€” the default.

1. Create the ReceiveHQ endpoint

Sign up at receivehq.com (magic link).

Create a tenant, add an inbound domain, and point MX at mx.receivehq.com .

Create a webhook endpoint:

HTTPS URL, for example https://yourapp.com/api/inbound

Format: Postmark (JSON) ( payloadFormat id postmark )

Optional Basic auth, configured on the endpoint (console, or basicAuthUser / basicAuthPass on the MCP create_endpoint / create_inbound_domain_endpoint tools). ReceiveHQ then sends Authorization: Basic <base64(user:pass)> on each POST.

Send a test message and inspect the delivery in the console .

2.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.