Attachments
MIME on SMTP, structured parts on HTTP inject, base64 on the REST send API.
Each send path takes files in a different shape. Pick the example for the path you use.
Attach over SMTP
Send multipart MIME in DATA. PostShiba does not rewrite attachment types. A message over 25 MB is rejected. See Send emails with SMTP.
Attach over HTTP inject
Pass content.attachments as an array of file_name, content_type, data, and base64. Set base64 to true when data is base64.
| REST limit | Value |
|---|---|
| Files per send | 10 |
| Size per file | 18 MB |
| Size of all files | 18 MB |
| Allowed types | Images (JPEG, PNG, GIF, WebP, SVG, TIFF, BMP, HEIC, HEIF, AVIF), PDF, EPUB, Word, Excel, PowerPoint, OpenDocument, RTF, plain text, CSV, zip, .vcf, and .ics |
filename is required, and its extension must match the file's contents: for example .jpg, .svg, .pdf, .epub, .docx, .xlsx, .csv, .zip, or .ics. A name like invoice.pdf.html is refused. PostShiba reads the type from the decoded bytes and sends the file with that type, whatever content_type says. A file it cannot identify is refused. A calendar invite must start with BEGIN:VCALENDAR.
A file that breaks a rule returns 422 invalid with field attachments. Files over 18 MB in total return 413 payload_too_large. The full field list is on Sending.
Files that arrive on inbound mail are covered on Receiving attachments.