R/connect_email.R
attach_connect_email.Rd
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 render_email()
or render_connect_email()
function.
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 |
|
subject | An option to specify the the email subject while attaching the email object. |
attachments | 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). |
attach_output | Should the rendered output of the main R Markdown
document be included as an email attachment? By default, this is |
text | Instead of using a rendered email document through the |
preview | Should the email message display it's own preview window? If
|
Since this function needs to be invoked within an R Markdown document, the
chunk option 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.