Understanding Email Attachment and Message Size Limits in MailerLogic
To maintain reliable email delivery and platform performance, MailerLogic applies size limits to all emails sent through the platform. These limits help prevent delivery failures, improve sending speed, and ensure messages are accepted by major mailbox providers.
Understanding these limits will help you design emails that deliver successfully and avoid errors when sending through the MailerLogic API.
Why Email Size Limits Are Important
Email size limits protect deliverability and performance:
Deliverability: Gmail, Outlook, and other providers reject oversized messages. Conservative limits ensure your emails reach inboxes.
Speed: Smaller messages are sent faster with fewer timeouts.
User Experience: Large emails load slowly and may exceed mobile data limits.
System Health: Limits prevent abuse and ensure fair resource distribution.
Email Size Limits Overview
| Component | Maximum Size | Notes |
| Total message size | 10 MB | Includes all content, attachments, and encoding overhead |
| HTML body | 1 MB | Gmail clips emails over 102 KB |
| Plain text body | 1 MB | Alternative version of your message |
| Single attachment | 5 MB | Per file limit |
| All attachments combined | 7 MB | Total across all attached files |
| Inline images (CID) | 3 MB | Images embedded in HTML |
| Number of attachments | 10 | Per message |
| Recipients per API request | 1,000 | Use batching for larger lists |
These limits are designed to ensure predictable performance and maximize deliverability across different email providers.
What Counts Toward Message Size?
Your total message size includes:
- HTML content -The formatted email body
- Plain text content - The text-only alternative
- Attachments - All PDFs, documents, and files
- Inline images - Images embedded using cid: references
- MIME overhead - Email encoding adds ~33% to attachment sizes
Attachments and inline images are Base64-encoded for email transmission, increasing their size by approximately 33%.
Example:
| Original File | Encoded Size | Counts As |
| 3 MB PDF | ~4 MB | 4 MB toward limits |
What Happens When Size Limits Are Exceeded
When you send an email through the MailerLogic API, the system checks the entire message size before accepting the request. This validation ensures that your email follows the platform’s size rules and can be delivered reliably. If any part of the email exceeds the allowed limit, the system will stop the request and return an error instead of sending the message.
API Rejects the Request
If your email is larger than the permitted limits, the MailerLogic API will immediately reject the request and return an HTTP 413 – Payload Too Large error.
This means the server received your request, but the email content inside the request is larger than what the system allows. Because the limits are exceeded, the email is not processed or queued for delivery.
This protects the system from handling oversized messages that could cause delivery failures or performance issues.
Detailed Error Response
Instead of returning a simple error, MailerLogic provides a detailed response that explains exactly what caused the problem. This response is designed to help developers and senders quickly identify the issue and fix it.
The error response typically includes the following information.
1. Which component exceeded the limit
The response identifies the specific part of the email that went over the limit.
For example, it may indicate that the issue occurred in the HTML body, an attachment, or embedded images.
2. The allowed size limit
The API also shows the maximum allowed size for that component. This helps you understand the exact restriction that applies.
3. The actual size of the component
Along with the allowed limit, the response displays the real size of the content you attempted to send. Seeing the difference between the allowed size and the actual size helps you determine how much the message must be reduced.
4. The file or field responsible for the error
If the issue is caused by an attachment, the response will often include the file name or field name that triggered the error.
For example, it may specify that a particular PDF or image is larger than the allowed attachment size.
Size Warnings
MailerLogic may also return when a message approaches recommended limits, even if the email is still allowed to send.
HTML Size Warning
If the HTML body exceeds 100 KB, a warning may be returned.
This is because Gmail clips emails larger than 102 KB. When this happens, recipients see a “Message clipped” notice and must click a link to view the full email.
Reducing HTML size helps ensure your full message appears immediately in Gmail.
Approaching the Total Size Limit
When the total message size reaches 80% of the 10 MB limit (8 MB), MailerLogic will return a warning.
This early notification helps prevent sending failures if the message grows beyond the maximum limit.
Best Practices for Managing Email Size
| Practice | What to Do | Why It Matters |
|---|---|---|
| Keep HTML Lightweight | Keep the HTML body under 100 KB. Avoid large templates, excessive inline CSS, and unnecessary formatting. | Prevents Gmail from clipping emails and improves loading speed. |
| Compress Attachments | Reduce file sizes before attaching them using PDF optimization tools, ZIP compression, or image compression. | Smaller attachments reduce total message size and improve sending performance. |
| Use External File Links | Host large files on cloud storage or your website and include a download link instead of attaching the file. | Keeps emails smaller and improves deliverability. |
| Optimize Images | Resize images to their display dimensions before embedding them. Use JPEG for photos and PNG for graphics with transparency. | Prevents unnecessarily large image files from increasing message size. |
| Batch Large Recipient Lists | If sending to more than 1,000 recipients, split the list into smaller batches or use Bulk Send or Send to Segment features. | Helps maintain efficient delivery and prevents API request limits from being exceeded. |
Checking Your Message Size
You can estimate your message size before sending to avoid hitting the limits.
A simplified calculation looks like this:
Total Message Size = HTML body size
- Text body size
- (Attachments × 1.33 encoding overhead)
- (Inline images × 1.33 encoding overhead)
- ~2 KB MIME overhead
Monitoring this estimate helps prevent rejected requests during sending.
Here is a Comparison with Other Email Services
Different email services enforce different message size limits.
| Provider | Total Limit | HTML Limit | Single Attachment |
|---|---|---|---|
| MailerLogic | 10 MB | 1 MB | 5 MB |
| Postmark | 10 MB | 5 MB | 10 MB |
| Mailgun | 25 MB | No specific limit | 25 MB |
| SendGrid | 30 MB | No specific limit | 30 MB |
| Amazon SES | 10 MB | No specific limit | 10 MB |
MailerLogic maintains conservative limits to ensure high deliverability and predictable performance across mailbox providers.
Frequently Asked Questions
Can I increase the email size limits?
Currently, the same limits apply to all MailerLogic accounts. Future plans may introduce higher limits for advanced tiers. If you have special requirements, contact support for guidance.
Do inline images count as attachments?
Inline images embedded using cid: references are counted separately from regular attachments. You can include:
-
Up to 3 MB of inline images
-
Up to 7 MB of standard attachments
Both still contribute to the 10 MB total message limit.
Do recipient email providers also have limits?
Yes. Many providers apply their own message size restrictions.
Examples include:
-
Gmail – 25 MB limit (HTML clipped at 102 KB)
-
Outlook.com – 10 MB
-
Yahoo Mail – 25 MB
-
Office 365 – 10–150 MB depending on configuration
-
Corporate email servers – often 10 MB or less
Even if MailerLogic accepts a message, the recipient's provider may still reject oversized emails.
How can I test my email size?
You can send test emails using the MailerLogic Test Email API endpoint:
POST /api/v1/test-email
This endpoint returns message size information and warnings without affecting your sending quota.
What if I need to send files larger than 5 MB?
Instead of attaching large files, upload them to a cloud storage or file-sharing service and include a download link in your email.
Common options include:
-
Cloud storage platforms
-
File sharing services
-
Hosting files on your own website
Using download links often improves deliverability compared to sending large attachments.
Need Help?
If you need assistance optimizing your emails or troubleshooting size issues, the MailerLogic support team can help.