Skip to content

Attachments

Attachments let you send files such as images, logs, PDFs, and artifacts alongside your message. Whether they arrive as true attachments depends on what the destination service supports.

Use --attach one or more times:

Terminal window
apprise -t "System Alert" -b "See attached log" \
--attach /var/log/syslog \
"mailto://user:pass@example.com"
apprise -b "Here are the files" \
--attach /tmp/photo1.jpg \
--attach /tmp/photo2.jpg \
"tgram://..."

Pass a single path or a list of paths via attach:

from apprise import Apprise
apobj = Apprise()
apobj.add("tgram://...")
# Single attachment
apobj.notify(body="See attached", attach="/path/to/file.txt")
# Multiple attachments
apobj.notify(
body="Artifacts attached",
attach=[
"/path/to/build.log",
"/path/to/report.pdf",
],
)

You can also provide a URL and Apprise will fetch it before delivering:

# Apprise will download this image and send it to the destination
# if you provide a user/pass combo, it will even authenticate for you
# prior to retrieving the attachment
apobj.notify(
body="Security Camera Snapshot",
attach="http://admin:pass@example.local/cam/snapshot.jpg"
)

When you generate content on the fly — rendered HTML, chart images, CSVs, PDFs — you can pass it directly as an AttachMemory object without writing anything to disk.

Pass a string or bytes directly — no temporary file is created:

import apprise
from apprise.attachment import AttachMemory
apobj = apprise.Apprise()
apobj.add("discord://webhook_id/webhook_token/")
apobj.notify(
body="Today's readings are attached.",
attach=AttachMemory(
content="date,value\n2026-03-20,42\n2026-03-21,38\n",
name="readings.csv",
mimetype="text/csv",
),
)

str content is encoded to UTF-8 automatically. Use bytes if you already have binary data.

Questions or Feedback?

Documentation

Notice a typo or an error?

Technical Issues

Having trouble with the code? Open an issue on GitHub:

Made with love from Canada