uSend Docs
Guides

Attachment types and limits

What file types you can attach and how to keep attachments deliverable.

Attachments are base64 strings in the attachments array: see Attachments. usend limits the total decoded size to 40 MB per email, and each attachment needs a filename. usend does not keep a list of forbidden file types, and sets the content type from the file extension when you do not give one (falling back to application/octet-stream).

The receiving side decides

Mailbox providers have their own rules, and they are stricter than usend's:

  • Size. Gmail accepts messages up to about 25 MB, Outlook and Yahoo about 20 to 25 MB, many corporate servers 10 MB or less. Base64 makes an attachment about a third larger in transit. An email with 15 MB of files may be too big for many recipients. Aim for under 10 MB in total, and link to larger files instead.
  • Executable and script types (.exe, .scr, .bat, .js, .vbs, .jar, .msi) are blocked or flagged by most providers. Archives that contain them (.zip, .7z) are scanned and often blocked.
  • Macro-enabled Office files (.docm, .xlsm) and password-protected archives are frequently quarantined.
  • HTML attachments are used in phishing and are treated with suspicion.

Types that usually arrive without trouble

PDF, PNG, JPEG, GIF, plain text, CSV, ICS calendar files and standard Office documents (.docx, .xlsx, .pptx).

Tips

  • Set content_type explicitly for unusual files, for example text/calendar for an invite.
  • Keep file names plain, with a normal extension and no path. usend uses only the base name.
  • For anything big, send a link to a file in your own storage (a signed, expiring URL) rather than attaching it. It also keeps your mail light and makes bounce rates lower.
  • Remote attachments by URL are not supported; send the content, or link in the body.
  • Batch emails cannot carry attachments.
  • Attachments are kept for your plan's retention period and then deleted.

If an email with an attachment is rejected

The bounce message tells you why (too large, policy). Policy blocks do not suppress the address: see Bounces and suppressions. Fix the attachment and send again.