I recently encountered this error when sending emails from a Shiny app using the Blastula package while accessing Gmail account:
Error in curl_fetch_memory(smtp_server, handle = h) : Login denied
I had been using this app for several years without issue until just now. I looked around for solutions and tried quite a few recommendations from older posts but was not able to resolve the issue. I have since found a solution to the error so I thought I would post it here.
Google recently changed their security settings, and now it is necessary (at least as far as I can tell) to create an app password after enabling 2-factor authentication to use this package.
Information on setting up and using Google app passwords can be found here.
Once you've created the password, you'll just need to re-create your credentials file using the new app password. This might not affect many people but I spent quite a lot of time trying to fix this simple problem and thought it may help some who are also stuck.