rich-iannone / quarto-email

MIT License
4 stars 0 forks source link

Scheduled Connect email does not send HTML output #8

Closed dareneiri closed 10 months ago

dareneiri commented 1 year ago

When using the Connect scheduled email feature, the email from Connect does not produce the HTML output as expected. However, when manually emailing within Connect (using the Email Icon to send email), an HTML email generates and sends as expected.

Very much looking forward to using quarto with scheduled emails. It's already much easier to use and implement when compared to Blastula, which has also been great!

  1. Using Quarto 1.3.361, with Workbench 2023.06.1
  2. Ran quarto add rich-iannone/quarto-email at October 11, 10am PT
  3. Generated manifest for quarto document (see below; modified version of what Rich has on github so it renders correctly without issue)
  4. Deployed to Connect (2023.09.0 on Ubuntu 20.04) via git-backed publishing option
  5. I can click the email icon in Connect and it sends the correct email image001 2  copy
  6. But then I schedule it to run at 11:08am local time and I get this instead image002 99  copy

    Quarto document used for testing.


---
format:
  html: default
filters:
  - rich-iannone/quarto-email
email-preview: true
---

\```{r}
#| echo: false

profit <- -100

if (profit < 0) {

  # Send email since we have a reason for it

  subject <- "We have a problem here"
  send_email <- TRUE

} else {

  # Don't send email; everything is fine

  subject <- "No email. This won't be sent"
  send_email <- FALSE
}
\```

The email body follows.`r profit`

::: email
Our profit was `r profit` this quarter and we felt you should know.

::: subject
`r subject`
:::

::: email-scheduled
`r send_email`
:::
:::
kmasiello commented 11 months ago

The email received is also missing the HTML report attachment and note about mail clients not properly viewing HTML attachments. These are ordinarily present when Connect sends the standard, non-customized email.

image

rich-iannone commented 11 months ago

@aronatkins Me and @kmasiello confirmed this when recently pairing. We are thinking it is an issue on the Connect side of things (only affecting scheduled renders as far as we can tell).

aronatkins commented 11 months ago

The intent was for Quarto content to not be directly attached to email. We do not render Quarto documents as standalone and they are generally not appropriate for download-and-view. I'll get Connect to avoid adding the note for Quarto content.

aronatkins commented 11 months ago

Looks like the Quarto email attachments are also missing. That's also an oversight. I'll get that resolved on the Connect side.