This function is used to customize emails sent by RStudio Connect in
conjunction with publishing an R Markdown document. It associates a custom
email message with the main R Markdown document, which Connect can send to
selected recipients. The main input is a rendered email message, which can be
produced by either the
attach_connect_email( email = NULL, subject = NULL, attachments = NULL, attach_output = FALSE, text = NULL, preview = TRUE )
A rendered email message. Normally, we'd want to use an
associated .Rmd file with the
An option to specify the the email subject while attaching the email object.
A vector of attachments for the Connect email. These files can be any of those deployed when publishing to RStudio Connect, and, any generated files (via R Markdown rendering).
Should the rendered output of the main R Markdown
document be included as an email attachment? By default, this is
Instead of using a rendered email document through the
Should the email message display it's own preview window? If
Since this function needs to be invoked within an R Markdown document, the
echo=FALSE is useful here (so that viewers of the rendered
document don't have to unnecessarily read code related to email inclusion).
While the output is invisible, any errors related to rendering will be
visible to the author.