custom email recipients [RSConnect]

I love that I can create emails dynamically in a data dependent way. One thing that I can't do however is specify who to email depending on data. Does anyone know if this is possible in RSConnect?

This is a great question! Unfortunately, that is not possible today. The "TO" email list is generated from the configuration saved in the "Schedule" pane.

We are definitely happy to record the feature request, though! Do you mind explaining any more about your use case, so we can understand it better? Would you be choosing a subset of the email list configured in the Schedule pane (i.e. don't send this to Sally today)? If not, I presume the email list would be a subset of the users within RStudio Connect (i.e. those who have access), at least?


Thanks for getting back to me!

My current use case is that I have a spreadsheet of dates and users (with emails) that I would like to use. I want to generate email reminders about hosting a weekly meeting that has a rotating lead. Instead of emailing the whole group every week, I only want to email the the leader for that week.

I can however see in the future that we would use this feature for custom reporting such as: send to sales team if... send to engineering if...

Hi @kieran

Thanks for sharing these use cases. Would using parameterized R Markdown and saved variants work for your current problem? I've just published a resource that solves a similar use case: sending an automated email out to a rotating recipient. You can look it over here:
I'm happy to answer any questions too - let me know if that helps!

Looks great!

Unfortunately I had 50 people in the rotation, so adding them all this way would have been a lot of clicking!

I ended up using a combination of a data frame similar to your rotation data frame + blastula + mailR::sendmail to get the job done. Basically had to get around reconnect emailing, and used reconnect to trigger the mailR script instead!

Thanks for the help though! I love this community!!!

1 Like

I'm glad you got something working and thanks for sharing your use case!

We will keep that in mind as we make improvements. One concern I imagine about allowing code to include arbitrary email addresses would be management by an admin (i.e. how would the admin prevent a rogue publisher from sending emails to a whole bunch of places they should not be).

It sounds like it would potentially fit your use case if you could programmatically filter the list that is provided in the Connect interface. I.e. allow the publisher to subset the list of emails provided by Connect. There are a handful of painful problems of mapping users / groups and such that would need to be thought through, though!

The other option would be a way to programmatically determine / manage variants... Hopefully we can get a more elegant solution sorted in the future!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.