This is a low level function that only works on attachments retrieved with gm_attachment(). To save an attachment directly from a message see gm_save_attachments(), which is a higher level interface more suitable for most uses.

gm_save_attachment(x, filename)

Arguments

x

attachment to save

filename

location to save to

See also

Examples

# NOT RUN {
my_attachment = attachment('a32e324b', '12345')
# save attachment to a file
save_attachment(my_attachment, 'photo.jpg')
# }