Here we explain how to send mail in ASP.NET. You can implement this code to your ASP.NET projects for mail features. This article will explain how to send mail using Gmail SMTP Server in ASP.Net. You can download the source code of sending mail application and please add your gmail id and its password to send mail.
Sending Mail in ASP.NET
Google may block sign in attempts from some email id’s that do not use modern security standards. It may show some error like, The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
To fix this error change the account permission in gmail settings. After login to gmail click on this url: https://www.google.com/settings/security
Even in some cases it shows error if you enable 2 step verification.
Download the project code:
Kindly replace with your gmail id and password to send the mail. Email ID and password stored in the variables.