diff --git a/DESCRIPTION b/DESCRIPTION index dbcbae75..d8910b09 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Description: Compose and send out responsive HTML email messages that render perfectly across a range of email clients and device sizes. Helper functions let the user insert embedded images, web link buttons, and 'ggplot2' plot objects into the message body. Messages can be sent through an 'SMTP' - server, through the 'RStudio Connect' service, or through the 'Mailgun' API + server, through the 'Posit Connect' service, or through the 'Mailgun' API service . Authors@R: c( person("Richard", "Iannone", role = c("aut", "cre"), email = "rich@posit.co", @@ -51,7 +51,7 @@ Suggests: withr SystemRequirements: pandoc (>= 1.12.3) - http://pandoc.org Encoding: UTF-8 -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) Config/testthat/edition: 3 Language: en-US diff --git a/R/connect_email.R b/R/connect_email.R index 596a06bb..38df60c5 100644 --- a/R/connect_email.R +++ b/R/connect_email.R @@ -1,6 +1,6 @@ -#' Associate an email when publishing an R Markdown document to RStudio Connect +#' Associate an email when publishing an R Markdown document to Posit Connect #' -#' This function is used to customize emails sent by RStudio Connect in +#' This function is used to customize emails sent by Posit 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 @@ -19,7 +19,7 @@ #' @param subject An option to specify the the email subject while attaching the #' email object. #' @param attachments A vector of attachments for the Connect email. These files -#' can be any of those deployed when publishing to RStudio Connect, and, any +#' can be any of those deployed when publishing to Posit Connect, and, any #' generated files (via R Markdown rendering). #' @param attach_output Should the rendered output of the main R Markdown #' document be included as an email attachment? By default, this is `FALSE`. @@ -93,7 +93,7 @@ attach_connect_email <- function( } } - # Set the RStudio Connect output metadata options for the email message + # Set the RStudio Posit output metadata options for the email message # body and for the images therein rmarkdown::output_metadata$set(rsc_email_body_html = email$html_str) rmarkdown::output_metadata$set(rsc_email_images = email$images) @@ -128,7 +128,7 @@ attach_connect_email <- function( invisible() } -#' Suppress any scheduled emailing in RStudio Connect +#' Suppress any scheduled emailing in Posit Connect #' #' This function is useful for suppressing the scheduled emailing of a published #' R Markdown document. It can be invoked anywhere in the R Markdown document @@ -171,7 +171,7 @@ create_rmd_preview_message <- function(subject = NULL) { paste0( "
", "

", - "This is an email preview for RStudio Connect

", + "This is an email preview for Posit Connect", "

", "Use attach_connect_email(preview = FALSE) ", diff --git a/R/prepare_rsc_example_files.R b/R/prepare_rsc_example_files.R index d5ca7156..07c49eb3 100644 --- a/R/prepare_rsc_example_files.R +++ b/R/prepare_rsc_example_files.R @@ -1,4 +1,4 @@ -#' Prepare example files for RStudio Connect emailing with R Markdown +#' Prepare example files for Posit Connect emailing with R Markdown #' #' A set of example files relevant to emailing with R Markdown in RStudio #' Connect can be spawned in a specified location. There is a set of three files @@ -22,10 +22,10 @@ #' The main report and associated email can be published by opening #' `"connect-example-main.Rmd"` and pressing the Publish button at the top-right #' of the Editor pane (please ensure beforehand that you are set up work with -#' RStudio Connect). If asked `"What do you want to publish?"`, choose the first +#' Posit Connect). If asked `"What do you want to publish?"`, choose the first #' option where only the `"connect-example-main"` document is published. All #' three files should be checked in the final dialog box, press the `Publish` -#' button to publish to RStudio Connect. +#' button to publish to Posit Connect. #' #' There is also the single `"connect-example-text-only.Rmd"` file that, when #' published, serves as a mechanism to send a text-only email. The content of diff --git a/R/render_email.R b/R/render_email.R index b0988875..17409a4b 100644 --- a/R/render_email.R +++ b/R/render_email.R @@ -5,7 +5,7 @@ #' with the output specified as `output: blastula::blastula_email`. While the #' `render_email()` and `render_connect_email()` functions have similar #' arguments, the `render_connect_email()` is preferred when publishing to the -#' RStudio Connect service. It allows for the inclusion of a predefined footer +#' Posit Connect service. It allows for the inclusion of a predefined footer #' that contains useful links for email recipients. #' #' @param input The input file to be rendered. This should be an R Markdown diff --git a/README.md b/README.md index ba9dc3ba..e54dd2c3 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,9 @@ email |> ) ``` -### Sending Email Messages through RStudio Connect +### Sending Email Messages through Posit Connect -We can also send email based on **R Markdown** files through **RStudio Connect**. The `prepare_rsc_example_files()` function provides .Rmd files that facilitate a main report + email report workflow. The key components are the `blastula::blastula_email` output type for the email report, and the use of `render_connect_email()` and `attach_connect_email()` in the main report. +We can also send email based on **R Markdown** files through **Posit Connect**. The `prepare_rsc_example_files()` function provides .Rmd files that facilitate a main report + email report workflow. The key components are the `blastula::blastula_email` output type for the email report, and the use of `render_connect_email()` and `attach_connect_email()` in the main report. ### Installation diff --git a/_pkgdown.yml b/_pkgdown.yml index 9a793b4a..6e30131c 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -74,9 +74,9 @@ reference: - delete_credential_key - delete_all_credential_keys - - title: Email Sending through RStudio Connect + - title: Email Sending through Posit Connect desc: > - Using the RStudio Connect service, it's possible to publish R Markdown + Using the Posit Connect service, it's possible to publish R Markdown documents and provide a scheduled email based on the report. Example .Rmd documents can be generated by using the `prepare_rsc_example_files()` function. These files constitute a working example for a publishing @@ -105,7 +105,7 @@ navbar: menu: - text: "Custom Emails with R Markdown and Blastula" href: https://solutions.rstudio.com/r/blastula/ - - text: "Customized Conditional Emails with RStudio Connect" + - text: "Customized Conditional Emails with Posit Connect" href: https://solutions.rstudio.com/r/blastula/conditional-example/ - text: "Scheduling Data Science Tasks" href: https://solutions.rstudio.com/data-science-admin/scheduling/ diff --git a/inst/examples/connect-example-main.Rmd b/inst/examples/connect-example-main.Rmd index 3b58a5d5..0005ba05 100644 --- a/inst/examples/connect-example-main.Rmd +++ b/inst/examples/connect-example-main.Rmd @@ -57,7 +57,7 @@ It looks like the year `r dallas_home_sales %>% filter(total_sales == max(total_ dallas_home_sales %>% write_csv("dallas_home_sales.csv") ``` -We can create an email on **RStudio Connect** that aligns with the content from this report. We do this with the `render_connect_email()` and `attach_connect_email()` functions from the **blastula** package. The email subdocument (`"connect-example-email.Rmd"`) is used to craft the contents of the email, drawing upon results available in this document. Attachments for the email can added by using the arguments: +We can create an email on **Posit Connect** that aligns with the content from this report. We do this with the `render_connect_email()` and `attach_connect_email()` functions from the **blastula** package. The email subdocument (`"connect-example-email.Rmd"`) is used to craft the contents of the email, drawing upon results available in this document. Attachments for the email can added by using the arguments: - `attachments` (for any output files or included files) - `attach_output` (which attaches the rendered report) @@ -65,7 +65,7 @@ We can create an email on **RStudio Connect** that aligns with the content from ```{r connect_email_setup, echo=FALSE} render_connect_email(input = "connect-example-email.Rmd") %>% attach_connect_email( - subject = "RStudio Connect HTML Email", + subject = "Posit Connect HTML Email", attach_output = TRUE, attachments = c("dallas_home_sales.csv", "austin_home_sales.csv") ) diff --git a/inst/examples/connect-example-text-only.Rmd b/inst/examples/connect-example-text-only.Rmd index 1757b1d8..843809b5 100644 --- a/inst/examples/connect-example-text-only.Rmd +++ b/inst/examples/connect-example-text-only.Rmd @@ -10,13 +10,13 @@ library(blastula) # An R Markdown Document for Sending an Email -We can create a text-only email using **RStudio Connect**. Only one function is required: `attach_connect_email()`. Files can be attached using the `attachments` argument. +We can create a text-only email using **Posit Connect**. Only one function is required: `attach_connect_email()`. Files can be attached using the `attachments` argument. None of the content from this R Markdown file will be included in the email message body, but, if we wanted to, we could elect to attach the output file using `attach_output = TRUE`. ```{r connect_email, echo=FALSE} attach_connect_email( - subject = "RStudio Connect Text Email", + subject = "Posit Connect Text Email", attachments = "austin_home_sales.csv", text = " diff --git a/man/attach_connect_email.Rd b/man/attach_connect_email.Rd index dac1c50a..3e0bc809 100644 --- a/man/attach_connect_email.Rd +++ b/man/attach_connect_email.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/connect_email.R \name{attach_connect_email} \alias{attach_connect_email} -\title{Associate an email when publishing an R Markdown document to RStudio Connect} +\title{Associate an email when publishing an R Markdown document to Posit Connect} \usage{ attach_connect_email( email = NULL, @@ -23,7 +23,7 @@ format in \code{\link[=render_connect_email]{render_connect_email()}} call (wher email object.} \item{attachments}{A vector of attachments for the Connect email. These files -can be any of those deployed when publishing to RStudio Connect, and, any +can be any of those deployed when publishing to Posit Connect, and, any generated files (via R Markdown rendering).} \item{attach_output}{Should the rendered output of the main R Markdown @@ -40,7 +40,7 @@ supplied then input to \code{text} is ignored.} default browser.} } \description{ -This function is used to customize emails sent by RStudio Connect in +This function is used to customize emails sent by Posit 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 diff --git a/man/prepare_rsc_example_files.Rd b/man/prepare_rsc_example_files.Rd index 3c7bdad1..f7b5b5ab 100644 --- a/man/prepare_rsc_example_files.Rd +++ b/man/prepare_rsc_example_files.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/prepare_rsc_example_files.R \name{prepare_rsc_example_files} \alias{prepare_rsc_example_files} -\title{Prepare example files for RStudio Connect emailing with R Markdown} +\title{Prepare example files for Posit Connect emailing with R Markdown} \usage{ prepare_rsc_example_files(path = NULL) } @@ -35,10 +35,10 @@ attachment by way of the \code{attachments} argument in the The main report and associated email can be published by opening \code{"connect-example-main.Rmd"} and pressing the Publish button at the top-right of the Editor pane (please ensure beforehand that you are set up work with -RStudio Connect). If asked \code{"What do you want to publish?"}, choose the first +Posit Connect). If asked \code{"What do you want to publish?"}, choose the first option where only the \code{"connect-example-main"} document is published. All three files should be checked in the final dialog box, press the \code{Publish} -button to publish to RStudio Connect. +button to publish to Posit Connect. There is also the single \code{"connect-example-text-only.Rmd"} file that, when published, serves as a mechanism to send a text-only email. The content of diff --git a/man/render_email.Rd b/man/render_email.Rd index 8eba4f4c..d2e55794 100644 --- a/man/render_email.Rd +++ b/man/render_email.Rd @@ -48,6 +48,6 @@ rendering an an email message. We can supply an R Markdown document (.Rmd) with the output specified as \code{output: blastula::blastula_email}. While the \code{render_email()} and \code{render_connect_email()} functions have similar arguments, the \code{render_connect_email()} is preferred when publishing to the -RStudio Connect service. It allows for the inclusion of a predefined footer +Posit Connect service. It allows for the inclusion of a predefined footer that contains useful links for email recipients. } diff --git a/man/suppress_scheduled_email.Rd b/man/suppress_scheduled_email.Rd index 199198b7..83d547f3 100644 --- a/man/suppress_scheduled_email.Rd +++ b/man/suppress_scheduled_email.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/connect_email.R \name{suppress_scheduled_email} \alias{suppress_scheduled_email} -\title{Suppress any scheduled emailing in RStudio Connect} +\title{Suppress any scheduled emailing in Posit Connect} \usage{ suppress_scheduled_email(suppress = TRUE) } diff --git a/tests/testthat/test-connect_emailing.R b/tests/testthat/test-connect_emailing.R index 439de975..aa8ca231 100644 --- a/tests/testthat/test-connect_emailing.R +++ b/tests/testthat/test-connect_emailing.R @@ -10,7 +10,7 @@ test_that("The `create_rmd_preview_message()` function works properly", { paste0( "^

", "

", - "This is an email preview for RStudio Connect

", + "This is an email preview for Posit Connect", "

Connect test message


$" )