Created
February 1, 2022 14:17
-
-
Save dickoa/8d74868598cefe70805b272b3bb721d2 to your computer and use it in GitHub Desktop.
Sending email from R using Microsoft365R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(Microsoft365R) | |
library(blastula) | |
outl <- get_business_outlook(app = "d44a05d5-c6a5-4bbb-82d2-443123722380") ## just once after you can do `outl <- get_business_outlook()` | |
body <- "## Hello! | |
This is an email message that was generated by the blastula package. | |
We can use **Markdown** formatting with the `md()` function. | |
Finally got this awesome package to work with `Microsoft365R` | |
```{r} | |
library(Microsoft365R) | |
outl <- get_business_outlook() | |
outl | |
``` | |
This is awesome right? | |
Ahmadou" | |
email_body <- compose_email( | |
body = md(body), | |
footer = md("sent using Microsoft365R")) | |
email_body | |
email <- outl$create_email(email_body, | |
subject = "Blastula works!", | |
to = c("[email protected]", "[email protected]")) | |
email$send() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment