Attachments
Send PDF, PowerPoint and image files with your e-mail
The paths below use the fictional account example_user; replace them with
resources you can access.
Use an attachment block in your e-mail content for each file to send. The
block is self-closing and has no visible output in the body preview. attach
is an alias. E-mails do not require a page block.
{{ attachment
ref: /u/example_user/d/report
format: pdf
name: Monthly report.pdf
disposition: inline
}}
{{ attachment ref: /u/example_user/d/report, format: pptx, name: Monthly report.pptx }}
{{ attachment ref: /u/example_user/p/revenue, format: png }}
{{ attachment ref: /u/example_user/g/dashboard, format: pdf }}
{{ attachment ref: logo.png }}
| Source | Formats |
|---|---|
| Document | pdf, pptx |
| Plot or grid | png, pdf, pptx |
| Uploaded image | Its original PNG, JPEG, GIF, WebP or SVG file; omit format |
Visual references use the same shortnames and local or user paths as
visualisations. Upload image files
to the mail's assets/ folder and refer to them by filename. To use an image
owned by another visual, use a path such as /u/example_user/p/chart/a/logo.png.
The sender must have access to every source.
| Option | Meaning |
|---|---|
ref | Required visual reference or uploaded image filename. |
format | Required for exports: png, pdf or pptx. Uploaded images retain their original format. |
name | Optional filename. Defaults to the source name and extension. The extension is appended if omitted. Path separators and control characters are rejected. |
disposition | attachment (default) or inline. |
mode | Export appearance: light (default) or dark. |
size | Export size preset: xs, sm, md, lg (default), xl, xxl, xxxl. Documents retain their page geometry. |
disposition: inline asks the mail client to present the file in the message
body, as macOS Mail can do. It remains a downloadable attachment. The mail
client chooses its presentation; this option does not insert an HTML image
or a CID reference at the block's position. Use vis for a visual embedded
in the body, or img for an embedded uploaded image.
All required files are prepared before sending to any recipient. Files remain in declaration order. Missing access, an invalid export, a timeout, a size limit or a content error fails the send; check the mail's logs before retrying.
A mail supports up to 50 attachment declarations. Default limits are 20 MiB per downloaded asset and 25 MiB for the complete MIME message, including encoding overhead. Operators can configure lower or higher byte limits. Attachment blocks have no effect in documents.