Articles in this section

Understanding Email Attachment and Message Size Limits in MailerLogic

Published:

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

ComponentMaximum SizeNotes
Total message size10 MBIncludes all content, attachments, and encoding overhead
HTML body1 MBGmail clips emails over 102 KB
Plain text body1 MBAlternative version of your message
Single attachment5 MBPer file limit
All attachments combined7 MBTotal across all attached files
Inline images (CID)3 MBImages embedded in HTML
Number of attachments10Per message
Recipients per API request1,000Use 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
Critical: Base64 Encoding Increases File Sizes

Attachments and inline images are Base64-encoded for email transmission, increasing their size by approximately 33%.

Example:

Original FileEncoded SizeCounts As
3 MB PDF~4 MB4 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

PracticeWhat to DoWhy It Matters
Keep HTML LightweightKeep 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 AttachmentsReduce 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 LinksHost 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 ImagesResize 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 ListsIf 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

  1. Text body size
  2. (Attachments × 1.33 encoding overhead)
  3. (Inline images × 1.33 encoding overhead)
  4. ~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.

ProviderTotal LimitHTML LimitSingle Attachment
MailerLogic10 MB1 MB5 MB
Postmark10 MB5 MB10 MB
Mailgun25 MBNo specific limit25 MB
SendGrid30 MBNo specific limit30 MB
Amazon SES10 MBNo specific limit10 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.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied