View source: R/extract-attachments.R
| extract_attachments | R Documentation |
The offline half of the attachment family (since the 2026 refactoring):
takes the full text of messages already fetched with
ImapCon$fetch_body(), walks the MIME
multipart tree by its declared boundaries, and either reports the
attachments (dest = NULL) or writes them to disk. It replaces both
list_attachments() (reporting) and
ImapCon$get_attachments() (writing).
extract_attachments(
msg_list,
dest = NULL,
content_disposition = "both",
override = FALSE,
as_is = FALSE,
mute = FALSE
)
msg_list |
A |
dest |
|
content_disposition |
One of |
override |
A |
as_is |
If |
mute |
A |
A named list of data.frames (see dest).
Other attachments:
ImapCon,
list_attachments()
## Not run:
out <- con$fetch_body(con$query(size > 1e6, use_uid = TRUE), use_uid = TRUE)
extract_attachments(out) # report only
extract_attachments(out, dest = "~/attachments") # write files
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.