Inbound Email Setup

Configure your domain to receive emails through YourSend in three steps.

Prerequisites

  • A YourSend account with a verified sending domain
  • Access to your domain's DNS settings (e.g., Cloudflare, Route 53, Namecheap)

Step 1: Add MX Record

Add the following MX record to your domain's DNS settings. This tells mail servers to route incoming email for your domain to YourSend's inbound SMTP server.

TypeHostPriorityValue
MXyourdomain.com10inbound-smtp.us-east-2.amazonaws.com

Note: DNS changes can take up to 48 hours to propagate, but usually take effect within minutes. You can verify propagation with nslookup -type=MX yourdomain.com.

Step 2: Create an Inbound Address

Create one or more inbound addresses on your domain. You can do this from the Dashboard Inbox or via the API:

cURL
curl -X POST https://api.yoursend.dev/v1/inbound/addresses \
  -H "Authorization: Bearer ys_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "address": "support@yourdomain.com",
    "display_name": "Support Team"
  }'
SDK
const address = await ys.inbound.addresses.create({
  address: 'support@yourdomain.com',
  display_name: 'Support Team',
});

Step 3: Send a Test Email

Send an email to your configured address from any email client (e.g., Gmail). Within seconds, it should appear in your Dashboard Inbox and be available via the Inbound Emails API.


Email Forwarding

Forward incoming emails to one or more external addresses. Useful for routing to an existing helpdesk or team mailbox.

cURL
curl -X POST https://api.yoursend.dev/v1/inbound/addresses \
  -H "Authorization: Bearer ys_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "address": "support@yourdomain.com",
    "forward_to": ["team@company.com", "alerts@slack.example.com"]
  }'

A forwarded message arrives with subject Fwd: [original subject] and the original body intact — HTML renders as HTML, and the original From, Date, Subject and To appear in a quoted header above it. Replying to a forward goes back to the original sender, not to your inbound address.

Forwarding is best-effort and never blocks receiving: the email is stored in your Inbox first. The per-target outcome is recorded on the inbound email, so a forward that fails is visible rather than silent.

Webhooks

Get notified in real-time when an email arrives. Set a webhook_url on an inbound address and YourSend will POST the email payload to your endpoint.

Webhook Payload
{
  "event": "email.received",
  "inbound_id": "50d4a4d6-...",
  "from": "customer@gmail.com",
  "to": "support@yourdomain.com",
  "subject": "Need help with my order",
  "spam_verdict": "PASS",
  "timestamp": "2026-03-20T04:01:45Z"
}

Auto-Reply

Automatically send a response when an email is received at a specific address. Great for acknowledging support requests or out-of-office messages.

cURL
curl -X POST https://api.yoursend.dev/v1/inbound/addresses \
  -H "Authorization: Bearer ys_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "address": "support@yourdomain.com",
    "auto_reply_enabled": true,
    "auto_reply_subject": "We got your email!",
    "auto_reply_html": "<p>Thanks for reaching out. We\'ll respond within 24 hours.</p>"
  }'