library(blastula)
Create a credential file once
For sending with GMail, generate a app password for mails
using this link and use this password for create_smtp_creds_file
create_smtp_creds_file(file="gmail.creds", provider = "gmail",
user = 'xx@xx.xx')
create_smtp_creds_file(file="office365.creds", provider = "office365",
user = 'xx@xx.xx')
Email content as markdown
content = "Hi Peter
How are you? This *is* a **list**.
* List A
* List B
Oliver
"
sending
smtp_send(email = compose_email(body = md(content)) ,
from = 'xx@xx.xx',
to = "xx@xx.xx",
subject = "demo email from R",
credentials = creds_file("gmail.creds") # <-- set credential file
)