I´m using customized emails using blastula and rstudio connect. The main idea is that when some condition apply the email will be sent and if not the email should be suppressed. For this I´m using blastula::suppress_scheduled_email() :
if(n > 1){
render_connect_email(input = "connect-example-email.Rmd") %>%
attach_connect_email(
subject = "RStudio Connect HTML Email",
attach_output = FALSE,
attachments = c("dallas_home_sales.csv", "austin_home_sales.csv")
)
} else {
blastula::suppress_scheduled_email()
}
But even if the condition is not met, rstudio connect keeps sending a default email that look like this:
My question is how can I do to avoid rstudio connect to send any type of email even if the condition is not met...