The following code uses System.Net.Mail to send emails from ASP.NET applications with authentication. Front End Code (SendMail.aspx) Back End Code (SendMail.aspx.cs)