Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with Google SMTP #50

Open
nitinmukesh opened this issue Aug 17, 2022 · 1 comment
Open

Does not work with Google SMTP #50

nitinmukesh opened this issue Aug 17, 2022 · 1 comment

Comments

@nitinmukesh
Copy link

nitinmukesh commented Aug 17, 2022

Hi,

I have enabled SMTP on GMAIL and trying to use this code but getting this error while using the following API
http://localhost:3000/api/auth/register

Error: 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 c4-c35345.73 - gsmtp 
{
    "status": 0,
    "message": {
        "code": "EAUTH",
        "response": "535-5.7.8 Username and Password not accepted. Learn more at\n535 5.7.8  https://support.google.com/mail/?p=BadCredentials b29-c34543- gsmtp",
        "responseCode": 535,
        "command": "AUTH PLAIN"
    }
}
EMAIL_SMTP_HOST=smtp.gmail.com
EMAIL_SMTP_PORT=465
EMAIL_SMTP_USERNAME=tried both email id and only account name
EMAIL_SMTP_PASSWORD=password goes here
# true for 465, false for other ports
EMAIL_SMTP_SECURE=true

Any idea on how to fix this.

@nitinmukesh nitinmukesh changed the title Does not work with Google SMPT Does not work with Google SMTP Aug 17, 2022
@subrat0796
Copy link

Hi @nitinmukesh I also had the same error a while ago.
I did a quick fix for it.
First make your account a secure account by turning on two factor authentication.
Then visit - https://myaccount.google.com/security?hl=en and check for app password.
Set your app password for mail service , device as custom and then use the password generated there here in EMAIL_SMTP_PASSWORD.

Then again run the app.
Hope that will work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants