Learn R Programming

gmailr (version 0.5.0)

save_attachment: save the attachment to a file

Description

this only works on attachments retrieved with attachment. To save an attachment directly from a message see save_attachments

Usage

save_attachment(x, filename)

Arguments

x
attachment to save
filename
location to save to

Examples

Run this code
my_attachment = attachment('a32e324b', '12345')
save attachment to a file
save_attachment(my_attachment, 'photo.jpg')

Run the code above in your browser using DataLab