s

gmail smtp mail the SMTP server requires a secure connection or the client was not authenticated edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 16 September 2020 | 4675

gmail smtp mail the SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at

check this article C# send email using gmail smtp to send mail from gmail

while trying to send an email from your C# code using gmail SMTP you might get this error. This might be because the user was not authenticated. Or this can also be because Gmail is blocking the mail from your application. If Gmail is blocking your mail, open the mail from Gmail and see if you have received a mail from Gmail.

Critical security alert

Sign-in attempt was blocked Someone just used your password to try to sign in to your account from a non-Google app. Google blocked them, but you should check what happened. Review your account activity to make sure no one else has access.

Solution

The solution is to enable less secure apps in your Gmail account.
1. Open gmail 2. Top Right menu select "Manage Your Google Account"

3. Select Security from the left menu

4. Scroll down and enable less secure apps

Once this has been enabled you will be able to send smtp mail from gmail using less secure apps.