CloudMailin will send your email as an HTTP POST request to the url that you specify. Depending on the status code we receive from your app several things can happen. The message will either be rejected, delayed or considered successfully delivered.
The following table outlines the HTTP status codes and the actions that CloudMailin will take.
|Status Code||Examples||Action Taken|
||Message receipt was successful.|
||The message will be rejected and the sender will be notified of this problem.|
||The message delivery will be delayed. We will tell the mail server to try again later.|
||Redirects will be followed up to 3 times.|
||If we cannot reach your server the message will be delayed. We will tell the mail server to try again later.|
Any other status and we will consider the message delayed and tell the mail server to try again later. This will be shown as either
unreachable in the delivery status pages.
You can send a custom error message when you reject a message by making sure the content type of your response is set to text/plain. This text will then be sent as part of the error message given by the server. This error message will also be stored within the Delivery Status of the message. You can use this to debug any problems that might occur at your server along with your own server logs.
Since sending a message larger than the allowed maximum size doesn't send a request to your web server you can set the message that's returned to your users as their email is bounced. Clicking on the 'Customize Message' button within the address page allows you to change this message.