Skip to main content📥 Email Relays
Mailbay lets you create and manage email relays - addresses where incoming emails are processed and delivered to your webhook. There are two types of relays:
-
Subdomain Relays
Automatically generated subdomains like
small-ship-104.mailbay.cloud, available instantly to every account.
-
Custom Domain Relays
Your own domain (e.g.
@example.com), configured to route email through Mailbay’s infrastructure.
Once a relay is active, any email sent to it - like support@example.com or anything@small-ship-104.mailbay.cloud - is:
- Captured by Mailbay
- Optionally processed by our AI Agent
- Delivered to your webhook
Subdomains
All Mailbay accounts include access to *.mailbay.cloud subdomains. These are ready to use immediately - no DNS setup required.
Example:
john@bright-hill-172.mailbay.cloud
Custom Domains
You can also use your own domain (like @example.com) to receive email through Mailbay.
To set this up, your domain’s DNS needs to point to our infrastructure.
Just email us at support@mailbay.io and we’ll help get everything configured.
📤 Inbound Email Flow
When an email is received for one of your configured domains:
- Mailbay identifies which relay it was sent to.
- We extract metadata and content from the email.
- If AI processing is enabled, AI Agent runs your custom prompt on the message.
- The final result including metadata, content, and optional AI response is sent to your webhook via HTTP POST.
🧠 AI Agent
The AI Agent is an optional feature that processes email content using a prompt you define per email relay.
How It Works:
- You provide a prompt (e.g. “Extract product name, price, and delivery date as JSON”).
- Mailbay runs the prompt against the email content.
- If the output is valid JSON, we include both the raw and parsed results in the webhook. If not, raw response from AI is included.