Continuing the discussion from blastula Error in curl_fetch_memory(smtp_server, handle = h) : Login denied
And another post :
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")
)```
The above two posts talk about the same problem I still donot have their solutions work. Perhaps there is some other problem this time.
I tried both:
Option 1:
email %>%
smtp_send(
to = "yyyyy@gmail.com",
from = "xxxxx@gmail.com",
subject = "Testing the `smtp_send()` function",
credentials = blastula::creds(user = "xxxxx",provider = "gmail")
)
AND
Option 2:
email %>%
smtp_send(
to = "yyyyy@gmail.com",
from = "xxxxx@gmail.com",
subject = "Testing the `smtp_send()` function",
credentials = creds_file("emailcreds.txt")
)
Both give the same error:
Error in curl_fetch_memory(smtp_server, handle = h) : Login denied
Can the experts please guide me how to even attempt to diagnose this issue?
Thanks
I also tried a third option:
email %>%
smtp_send(
to = "yyyyy@gmail.com",
from = "xxxxx@gmail.com",
subject = "Testing the `smtp_send()` function",
credentials = creds_key(id = "kkkkkk")
)
Now I don't know what is left to be tried.
Have you prepared by doing this ?
To use blastula with Gmail you will need to have an app password created for your Gmail account. An app password is a password generated by Google for the purpose of verifying an external app rather than using your standard password. Emails sent with only your standard password pair will be rejected by Google for security purposes. Note that to create an app password you will also need two factor authentication enabled for your account. To create an app password, follow the steps on the Google Account Help page .
I am on it, thanks @nirgrahamuk ! Will update here.
system
Closed
March 21, 2023, 8:04pm
5
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.