Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

r Blastula Error in curl::curl_fetch_memory(url, handle = h) : MAIL failed: 530

Tags:

email

curl

r

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 ?

like image 575
user2948714 Avatar asked Dec 07 '19 01:12

user2948714


1 Answers

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"))
like image 142
pbertens Avatar answered Nov 10 '22 00:11

pbertens