Server Error in '/' Application.

The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required

Source Error:


Line 1263:            Smtp.UseDefaultCredentials = false;
Line 1264:            Smtp.Credentials = basicAuthenticationInfo;
Line 1265:            Smtp.Send(mymailmsg);
Line 1266:        }
Line 1267:        public void SendMail(string msg, string email)

Source File: c:\inetpub\vhosts\igorwal.com\httpdocs\App_Code\Library\Library.cs    Line: 1265

Stack Trace:


[SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: Authentication required]
   System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) +1904382
   System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode) +46
   System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) +88
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1856
   AdvancedLibrary.Library.ErrorMsg(String pagename, String domain, String strerror) in c:\inetpub\vhosts\igorwal.com\httpdocs\App_Code\Library\Library.cs:1265
   Search_Marriage.fillgrid() in c:\inetpub\vhosts\igorwal.com\httpdocs\Search_Marriage.aspx.cs:1278
   Search_Marriage.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\igorwal.com\httpdocs\Search_Marriage.aspx.cs:82
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0