Menu

Receive inbound email in Laravel with a webhook
πŸ“°

Receive inbound email in Laravel with a webhook

DEV Community: laravelΒ·ReceiveHQΒ·1 day ago
#4GVeawGo
#devtolaravel#devto#dev#receivehq#inbound
Long article (606 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Receive inbound email in Laravel with a webhook

ReceiveHQ accepts SMTP on your domain (MX β†’ mx.receivehq.com ) and POSTs parsed mail to an HTTPS URL. This example is a Laravel route that reads the default Postmark JSON format and checks optional Basic auth.

1. ReceiveHQ setup

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://yourapp.com/inbound/receivehq , format Postmark (JSON) ( payloadFormat id postmark ), and optional Basic auth on the endpoint (console, or basicAuthUser / basicAuthPass on the MCP create tools).

Send a test and open the delivery in the console .

ReceiveHQ will send POST with Content-Type: application/json , User-Agent: receivehq-inbound/1.0 , and, if you configured it, Authorization: Basic <base64(user:pass)> . It does not send Postmark HMAC headers.

2. Route and controller

Exclude the route from CSRF verification (it is a machine POST, not a form).…

Continue reading β€” create a free account

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