Our inbound email works by catching all emails addressed to the
inbound subdomain of your domain. For example if your domain is
test.com, any emails sent to
*@inbound.test.com will be handled. We then POST all emails onto a webhook address of your choice, defined on the
inbound_emails page in our application.
All plans come with unlimited domains, so if the
inbound subdomain is unavailable on your domain, you can always create another subdomain and use that (e.g.
We will attempt to send to your endpoint five times with an increasing gap in between each send, after which we will declare the email as failed and will not try again.
Your domain must have passed DKIM verification and your organization must have an active plan to accept inbound emails
To setup Inbound Emails you need to add a
CNAME DNS record that points from
inbound on your domain to
inbound.ohmysmtp.com. This will ensure that any emails sent to
inbound.<your-domain> are sent to our servers. The specific instructions and example records are available on the Inbound Emails page of your Domain.
After you have setup your DNS records, you just need to add an Endpoint URL, which can be any
https address. For testing, you can use a tunnel to your local machine like ngrok or a service like https://httpstat.us/.
There are four statuses that an inbound email can be in after it has been received by our servers:
- Queued: Email received and has been added to the queue for sending to the endpoint
- Success: The POST request to the endpoint succeeded, with an HTTP status code between 200 and 300
- Retrying - The POST request to the endpoint failed. We attempt to send 5 times, at vary intervals, after which the email will move to the
- Failed - The POST request has permanently failed, either through exhausting the number of retries or another permanent failure (e.g. HTTP connection errors or timeouts that are unlikely to succeed in the near future)
Email Payload Reference
Emails are sent as HTTP POST requests with a JSON body containing the following parameters:
|headers||Required||Array of strings|
|raw||Required||string||The full raw email as described in RFC 822|
| attachments | Optional | Array of Attachments | See Attachments |
Properties that are marked as Optional may not appear as a parameter in the body
Attachments are sent as an array, in the following structure:
|content||Content of the attachment, encoded as a base64 string||Required||string|
|type||Type of the attachment, usually just "attachment"||Required||string|
|contentType||MIME type of the message||Required||string|
|contentDisposition||Content disposition type for the attachment||Required||string|
|filename||File name of the attachment, if provided||Optional||string|
|headers||Headers for the attachment||Required||Array of strings|
|checksum||An MD5 hash of the attachment content||Required||string|
|size||Message size in bytes||Required||number|
|contentId||The header value from ||Optional||string|
|related||Attachment should not be offered for download as a "standard" Attachment||Optional||boolean|