Receiving Your Email via HTTP (POST) API

CloudMailin sends your email as an HTTP POST to the URL that you specify. There are several formats to choose from:

Format Details Description
Multipart Normalized details A new multipart/form-data based format consisting of four main parts envelope, headers, body, attachments. this normalizes headers and arrays to make things more consistent. We recommend using this as the default for new projects.
JSON Normalized details Exactly the same as the multipart format but this uses JSON to encode the details it normalizes headers and arrays to make things more consistent. We recommend using this as the default for new projects.
Raw Message details This sends just original Raw message as a single multipart/form-data request parameter.

If you're starting a fresh app then the Multipart Form/Data (Normalised) Hash Format or JSON (Normalised) Hash Format will be useful depending on whether you prefer to work with JSON or not.

We recommend using the Multipart Form/Data (Normalised) Hash Format though as it's generally the easiest to work with in modern web frameworks.

If you just want to use CloudMailin to forward the entire email to your website over http without parsing or processing it at all then the Raw format does exactly that.

Testing a Format

Webhook App

If you want to see how a format will look with your own content we recommend using the WebhookApp. Simply set the WebhookApp as your message url target and then send an email. The message content will then be sent over HTTP to the app using WebSockets so you can view this content and try out the format.

Postman

We also have some examples in Postman that you can use to start development before you send your own mail. The examples include an email message with all the expected attributes and an attachment.

Run in Postman


Older (Deprecated) Formats

The original and standard multipart / JSON formats should be considered deprecated but are still available for apps that are currently using them.

Format Details Description
Multipart details An older multipart/form-data based format consisting of four main parts envelope, headers, body, attachments.
JSON details An older JSON format, the same as the multipart format but this uses JSON to encode the details.
Original details The original CloudMailin message format (only recommended for legacy projects).