NOOB question related to R blastula. I am trying to send an email with blastula using office365. I was able to create a credentials file but can't seem to send a simple test email:
require(blastula) ; require(curl)
email <- compose_email(body = "Insert your e-mail body here", footer = "Insert your e-mail footer here")
email %>% smtp_send(from = "[email protected]", to = "[email protected]", credentials = creds_file("C:/Users/me/CREDS_FILE")
)
There seems be a dependency on curl that's throwing the error: Error in curl::curl_fetch_memory(url, handle = h) : MAIL failed: 530
What am I doing wrong ?
Try use_ssl = TRUE in create_smtp_creds_key. This worked for me.
email <- compose_email(
body = md(
"Your email message"
))
smtp <- create_smtp_creds_key(
id = "outlook",
user = "[email protected]",
provider = "office365",
host = "smtp.office365.com",
use_ssl = TRUE)
email %>%
smtp_send(to = to,
from = from,
subject = subject,
credentials = creds_key(id = "outlook"))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With