-
Notifications
You must be signed in to change notification settings - Fork 409
Open
Description
We have recently added support for multiple emails rendered from a single document. This next step will allow any/all emails to have conditional recipients.
I am flexible on the format of accepted quarto input, here is a draft of how it might look:
---
title: Email Test Document
author: Charles Teague
format: email
---
The report content. Anything that is here is not part of the email message.
::: {.email}
::: {.subject}
The subject line.
:::
```{python}
import datetime
# Get today's date
today = datetime.date.today()
if today.weekday() < 5:
recipients = ["test1@test.com", "test2@test.com", "test3@test.com"]
else:
recipients = ["test4@test.com", "test5@test.com", "test6@test.com"]
```
:::{.recipients}
`{python} recipients`
:::
::: {.email-text}
An optional text-only version of the email message..
:::
The HTML email content. Here you can add code cells, produce images, and write accompanying text.
:::
Any additional report content not part of the email message.Multiple emails here: #13882
Reactions are currently unavailable