Error in curl::curl_fetch_memory(url, handle = h) : Login denied

When using the package Blastula with gmail I get the following error message:

Error in curl::curl_fetch_memory(url, handle = h) : Login denied

My code is:

email <- render_email('test.Rmd')


create_smtp_creds_key(
  id = "gmail",
  user = "myemail@gmail.com",
  provider = "gmail",
  use_ssl = TRUE
)
email %>%
  smtp_send(
    from = "myemail@gmail.com",
    to = "myotheremail@hotmail.com",
    subject = "Testing the `smtp_send()` function",
    credentials = creds_key(id = "gmail")
  )```

Have you already changed the account setting in Gmail as detailed in the documentation?
https://rich-iannone.github.io/blastula/articles/sending_using_smtp.html#requirement-for-using-gmail

2 Likes

I did it and it did not work either. However I found the solution. I had to explicitly enter the user and provider "gmail".

smtp_send(
.......,
credentials = blastula::creds(
user = "myemail@gmail.com",
provider = "gmail")

Thanks for your response!

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.