Unsupported Attachment Types
To prevent malware propagation and ensure high inbox delivery rates, Mailofly restricts certain executable, script, and high-risk attachment types.Blocked File Extensions
The following file extensions are strictly blocked by Mailofly and major receiving mail transfer agents (Gmail, Outlook, Yahoo):
If an email payload includes a blocked file type, the API rejects the request with an HTTP 400 error.
Recommended Formats
- Documents:
.pdf,.docx,.xlsx,.pptx,.csv,.txt - Images:
.png,.jpg,.jpeg,.gif,.webp,.svg - Archives: Standard
.zipand.tar.gz(containing safe documents) - Calendar:
.ics
Size Limits
- Maximum Total Payload: 25 MB per email (including headers, HTML content, and base64-encoded attachments).
- Base64 Overhead: Base64 encoding inflates binary file size by approximately 33%. For example, a raw 18 MB file will encode to ~24 MB.
- Large Files: For attachments exceeding 20 MB, we recommend hosting the file (e.g. AWS S3, Cloudflare R2, Google Cloud Storage) and providing a secure download link in the email body.