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:
  1. Captured by Mailbay
  2. Optionally processed by our AI Agent
  3. 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:
  1. Mailbay identifies which relay it was sent to.
  2. We extract metadata and content from the email.
  3. If AI processing is enabled, AI Agent runs your custom prompt on the message.
  4. 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.
I