Azure / Microsoft365R

R SDK for interacting with Microsoft 365 APIs
Other
313 stars 44 forks source link

Sending custom email content to multiple recipients via tibble #132

Closed busmansholiday closed 1 year ago

busmansholiday commented 2 years ago

Using Microsoft365R and its email functionality, is there a method to start with a tibble of recipients, subject lines and content (as fields) and to then pass these fields to create$email?
e.g.

I have already authenticated

library(Microsoft365R)

test_custom_email <-tibble( to = c("a@xyz.com", "b@xyz.com"), content = c("This is content A", "This is content B."), subject= "Further Email tets from test environment" ) test_custom_email

I am looking for a syntax that would take these tibble columns as inputs and send the (differentiated content) to the appropriate user? Ideally it would take the process right through to "send".

Thanks in advance,

eitsupi commented 2 years ago

It may be the pwalk function in the purrr package that you are looking for. https://purrr.tidyverse.org/reference/map2.html

hongooi73 commented 1 year ago

This is a generic R coding question, not a package issue. Consider asking on the RStudio/Posit forum, or StackOverflow.