In this article I will explain how to resolve the error The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required in ASP.Net Application.
The following error occurs when you try to send email using Gmail credentials in your ASP.Net application.
Less Secure Apps setting:
if you have not received email then use the following link.
as above link click on Access for less secure apps Turn ON then again Run your Code Send Email Code.