When attempting to send an email (using Gmail SMTP) from my web application I get error message about failed authentication. This is a result of 'Less secure app access' feature being turned off in Gmail security settings. I was able to send emails via my local dev environment once I turned this feature on. However when I deployed my application to production server the issue repeated and this time turning 'Less secure app access' on does not work anymore - even can not send emails via dev environment anymore. I noticed that the feature gets turned off after some time (several minutes/an hour/next day) even when I specifically turn it on.

1 Answer 1


complete your profile by adding recovery phone and email. then turn on less secure app and provide the password again.

It worked for me for several app and for different gmail account. I count not find any reference regarding this.

  • 1
    Please add a reference or extend a bit your answer to share with us how do you know that this works. Commented Feb 5, 2020 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.