add_attachment {blastula} | R Documentation |
Add a file attachment to an email message
Description
This gives us a simple interface for attaching a file to the email object.
When it comes time to send the email through smtp_send()
, all attachments
(specified by individual calls to add_attachment()
) will be faithfully
transmitted along with the message.
Usage
add_attachment(
email,
file,
content_type = mime::guess_type(file),
filename = basename(file)
)
Arguments
email |
The email message object, as created by the |
file |
The filename for the file to be attached. |
content_type |
The MIME type for the attachment. By default, this is
guessed by the |
filename |
the filename for the attachment. This can be different than
the basename provided to |
Details
There are options available to specify the attachment's MIME type, its disposition, and customize the attachment's recipient-facing filename.