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"]
  }'

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",
  "email": {
    "id": "50d4a4d6-...",
    "from_address": "customer@gmail.com",
    "to_address": "support@yourdomain.com",
    "subject": "Need help with my order",
    "text_body": "Hi, I need help...",
    "html_body": "<p>Hi, I need help...</p>",
    "spam_verdict": "PASS",
    "spf_verdict": "PASS",
    "dkim_verdict": "PASS",
    "dmarc_verdict": "PASS"
  }
}

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>"
  }'