Skip to main content

Inbound: Forward Emails

With Mailofly Inbound Routing, you can accept incoming messages on any custom domain address (e.g. support@yourdomain.com or hello@yourdomain.com) and forward them either to a personal mailbox or an HTTP webhook.

1. Configure Inbound MX Records

Ensure your domain’s DNS includes the Mailofly Inbound MX record:
  • Host: @ (or your subdomain, e.g. mail)
  • Type: MX
  • Value: inbound.mailofly.com
  • Priority: 10

2. Setting Up Forwarding via Webhook

When Mailofly receives an inbound email, it parses the MIME body, attachments, and headers into a JSON payload and dispatches it to your configured webhook endpoint. You can set up an API route or serverless function to forward the email:
app/api/inbound-webhook/route.ts