EmailContent.attachments is the collection of files attached to an email message. Each attachment exposes its name, content (bytes), and get_document_info(), and you can add and remove attachments.
To watermark an attached document, open attachment.content in its own Watermarker (via io.BytesIO), add the watermark, and write the bytes back — the same pattern shown for spreadsheet attachments.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.