CloudMailin allows you to receive any volume of email over HTTP via HTTP POST Webhook. For some time it has been possible to offload the sending of email attachments to Cloud Storage such as Amazon Web Services (AWS) S3, Google Cloud Platform Storage or Azure Blob Storage.
It's also possible to send the entire email to CloudStorage, opening up new possibilities for your HTTP server to process inbound emails.
You can send the full email to:
Sending your full email, rather than just the email attachments to AWS S3, Google Cloud Storage or Azure Blob Storage opens new possibilities for receiving inbound emails via Webhook. You could process the email asynchronously, use the system as a backup or work more effectively with serverless functions for example.
There are two formats available for full email storage raw and parsed JSON:
| Format | Description |
|---|---|
RAW |
The original, unparsed email with headers and body. |
JSON |
A fully parsed email in JSON format. This format is the same as the JSON format sent to your Webhook. |
Once you have enabled the feature you setup the Full Message storage in a very similar way to setting up attachment storage.
There are several ways that you can grant permission for CloudMailin to create files in your S3 Bucket. The simplest is to use the AWS website.



Edit and then Add grantee

grantee field from above, paste the CloudMailin Canonical ID,
choose write and then saveAWS Canonical ID:
83fec836f8a832fae9c46e100739b635be3b3636d14887e1c7616e2dba1a88c0
You should now have granted CloudMailin permission to add files to your S3 bucket. You can now Setup CloudMailin to receive the emails in its Webhook.
It's possible to configure CloudMailin to send the full email directly to an Azure Blob Storage container. CloudMailin writes to the container using a Shared Access Signature (SAS) URL that you generate, so we never need your storage account keys.
Container in the Blob service panel of your Azure Storage
Account (or choose an existing one).

Shared Access Signature (SAS).Blob service with Object and Write
permission and select the start and end dates for the signature. You'll need
a large enough date range to provide CloudMailin continued access to the
container.

SAS URL. CloudMailin
needs the whole URL, not just the SAS token.Be sure to select a large enough date range for continued use with CloudMailin.
You should now have granted CloudMailin permission to add files to your Azure Blob Storage container. You can now Setup CloudMailin to receive the emails in its Webhook.
It's possible to configure CloudMailin to send the full email directly to a Google Cloud Storage bucket. You grant the CloudMailin upload service account permission to create objects in your bucket, so there are no credentials to share with us.
Bucket or edit your existing bucket.

Permissions Tab and select Add to add a member to the
permissions tab.Storage Object Creator
permission to allow the creation of new Storage Objects.

The CloudMailin service account that you need to grant permission is:
uploads@cloudmailin-uploads.iam.gserviceaccount.com
You should now have granted CloudMailin permission to add files to your Google Cloud Storage bucket. You can now Setup CloudMailin to receive the emails in its Webhook.
Now that you've added the permission to upload emails head to CloudMailin and enable the feature.
Add full message storage and choose your storage provider.bucket_name/path_prefix). You'll
also need to add your S3 bucket region and select the permission to apply
to files when they are created. We recommend using
Bucket owner full control here.SAS URL you generated above and the
name of the container. CloudMailin extracts the storage account domain
and SAS token from the URL.bucket_name/path_prefix).When you save, CloudMailin writes a small test file to your storage to check that the permissions are correct. If the test fails the settings are not saved and the form will show which field needs attention.
Now when your emails are received you'll still get the regular Webhook but your
HTTP POST will also include the store_url parameter in the envelope. For
example the JSON format will look like the following:
"envelope": {
"to": "to@example.com",
"from": "from@example.com",
"helo_domain": "localhost",
// ...
"store_url": "https://example.s3.amazonaws.com/2021_12_01_00_00_00_a8ed6a3f7aeb93ce726b9dd2dea9eb53.eml"
}
For more detail relating to the store_url see the HTTP Post Formats documentation.