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?
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
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
Related
I used gmail account to send email notification when my script fails. Since May 30, 2022, Gmail stops supporting access over Less secure app access
This setting is no longer available.
From Google support:
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.
I am receiving python error even my user and password is OK (tested by logging to my account):
Authentication error. Wrong user or password.
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials u2-20020a1709061da200b0072f42ca2934sm7507815ejh.148 - gsmtp')
What is the best way how to use google account for notification emails or is there better way or tool how to be notified?
When you want to send email over Gmail SMTP, google enable you to set up App password. You have to have set up 2-Step verification in your google account. Once 16 digit password are generated, you just replace password for login (username is your email address, that does not change).
Sources:
Google: Sign in with App Passwords
Stackoverflow: What's solution for sending emails from python while gmail " the less secure apps " is not enabled anymore
Hello I made a NodeJs backend and I implemented nodemailer. The only issue is I get the error with Invalid Login, because I don't have less secure apps turned on. I know, but I went to google and I clicked on the less secure app section and this is what I get
This setting is no longer available. Learn more
Does anyone solved the error different way and is able to send emails?
When you want to send email over Gmail SMTP, google enable you to set up App password. You have to have set up 2-Step verification in your google account. Once 16 digit password are generated, you just replace password for login (username is your email address, that does not change).
Sources:
Google: Sign in with App Passwords
I was trying to get form data to my gmail account so I get to know about 'nodemailer' package but the problem is that it is asking for my gmail password also I have to make my gmail account less secure for this.
Is there any way to get mail without my password?
Use an 'App Password' for this purpose. This is "a 16-digit passcode that gives a less secure app or device permission to access your Google Account". See https://support.google.com/accounts/answer/185833?hl=en
while sending mail using modemailer with only few accounts it is working fine, but with some accounts, even though the credentials are correct, it is giving "Invalid login: 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials 3sm51852778pfg.186 - gsmtp"
Solution 1: It's the gmail security for less secure apps. Also a quick solution will be to turn off the access Allow less secure apps
Solution 2: Best way will be to work with 2-Step verification 2-Step Verification
Solution post May 2022:
The issue you are having is related to googles remove Less secure apps & your Google Account setting from our google accounts. Less secure apps was what enabled us to use our google login and passwords with their smtp server.
In order to use it now you must enable 2fa on your google account and configure an apps password. You can then use the apps password in place of your actual google password to connect to the smtp server.
Quick fix for SMTP username and password not accepted error
Here's my question. To access our app, the users must be invited.
This means, we use an admin web app to create the user account in Firebase and we send him an invite to download the app and use it.
Now the next phase, how can we send to the newly created user his credentials?
Our first idea was to use a temporary password. We could send the password by email to the user and ask him to redefine his password at his first logging.
His this a good idea? I guess it's not
Is there a better way?
Thanks for the help.
T
There is no way to prevent users from authenticating with Firebase Authentication. So instead of depending on pre-creating of the accounts, you should ensure that only authorized users have access to the data.
For example, when using the Firebase Database, you could keep a list of authorized users in the database:
/authorizedEmails
t4ncr3d3#hisdomain,com: true
puf#hisdomain,com: true
And then you'd check the auth.email variable against this list in the database's security rules.
Instead of pre-creating the account, you could then simply email the user an invite to the app. E.g. an email with a link like http://myapp.mydomain.com/signup.html?email=t4ncr3d3#hisdomain.com
Then when they click the link, pre-populate the sign-up form with the email address you sent the message to and call createUserWithEmailAndPassword().
You could use the new (as of Nov 2016) firebase-admin library (java or node) to programmatically create users from your server side - see this link for details.
After that, you could send the email and password to the user via email, and allow only email based password logins. Unfortunately, you can't force uninvited people to stop authenticating with your app, as they could manually invoke the APIs used to create a new account on their own, as you see on the same page. However, you are under no obligation to provide a login mechanism via your UI. They would have to use their browser to type and invoke the JS needed to create the account.
If you are OK with people forcibly creating accounts, but you would like to lock down their access, you could do something similar to what Frank mentions in another answer by using admin control of the database to restrict access to those users you have created and invited with a special flag in the database (that only you can modify using the admin SDK) that acts as a gateway into your app. If you perform the security properly, that should prevent those whom you didn't invite from using the app, even if they can effectively authenticate with it.