sammddltn
sammddltn

Reputation: 87

can curl no longer send emails using gmail accounts?

I've been using the following to test that html email templates come through formatted correctly in different clients:

curl --ssl-reqd   --url 'smtps://smtp.gmail.com:465'   --user '{EMAIL}@gmail.com:{PASSWORD}'   --mail-from '{EMAIL}@gmail.com'   --mail-rcpt '{EMAIL}@gmail.com'   --upload-file {FILE}

And all of a sudden I'm getting "curl: (67) Login denied" - the login details are definitely correct and nothing's changed on my end. My guess is that google is now blocking non SSO email logins?

Upvotes: 3

Views: 2671

Answers (2)

lynx_74
lynx_74

Reputation: 1771

You will have to make a new 16 digits password specific for this application and simply change the account password to this new secure app password. Now you can create one password for each app. It will keep your account password safe and manage app passwords separately.

Login to your account to create it: https://myaccount.google.com/apppasswords

You must enable the 2-Step Verification (https://myaccount.google.com/signinoptions/two-step-verification) to access this feature.

To help keep your account secure, from May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.

https://support.google.com/accounts/answer/6010255

Upvotes: 2

Don't know if will solve your problem, but if you have enabled 2-Step Verification in your Google account, you have to create some app password

Upvotes: 2

Related Questions