What are the Attachment and Email Size Limits?
Emails and attachments have size limits for both sending outbound messages through Postmark or receiving messages as JSON with inbound processing. This help article will make you aware of what size limits are in place for both outbound sending and inbound processing, which will be useful for troubleshooting sending or inbound processing errors and advising your application’s users of best practices.
Sending Size Limits
- TextBody and HtmlBody can each be up to 5 MB each
- Total message size, including attachments, can be 10 MB
- Batch endpoint total payload size, including attachments, cannot exceed 50 MB
If you attempt to send an email that exceeds any of these size requirements, the message will be rejected. We calculate the size of the email after it has been base64 encoded, so please keep in mind your final email size may be larger after being encoded.
Inbound Size Limits
- Total cumulative size for all Inbound attachment files may not exceed 35 MB
To check the total size of an inbound webhook notification, you can use the Content-Length header of the POST request received. Now that you know the size limits in place, you can advise your users of best practices around sending and receiving emails with your application.
Limits in retrieving and rendering messages
Postmark will only store messages of up to 1MB in total size. Messages larger than that will be truncated when returned within the Postmark UI and the Messages API. The 1MB limit refers to the total size of the message, html body, plain text, and Base64 code for attachments included.
Limits in retrieving attachments
Attachments are not retrievable via the Postmark UI, API, or webhooks as Postmark does not host the attachment in any way. We do, however, log the attachment bytes in the Postmark UI, under the Raw Source tab.
Only attachment bytes that do not exceed 1MB will be shown in full, those that exceed 1 MB will be truncated with the [Message Truncated] note in the Raw Source.
The only way to ensure you are getting the full bytes for all attachments would be to log it in your application when receiving the webhook for later access in case the processing fails in your application.