Note that there are some explanatory texts on larger screens.

plurals
  1. POServer does not support secure connection
    primarykey
    data
    text
    <p>Some days before this code perfectly works for me but now it shows exception </p> <pre><code> MailMessage mail = new MailMessage(); mail.To.Add("pramuk97@gmail.com"); mail.From = new MailAddress("pramuk97@gmail.com"); mail.To.Add("pramuk97@hotmail.com"); mail.Subject = "from bhsbiet souvenir 2012"; mail.Body = TextBox5.Text; mail.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Credentials = new System.Net.NetworkCredential("pramuk97@gmail.com", "pwd"); smtp.EnableSsl = true; smtp.Send(mail); </code></pre> <p>And the exception is Server does not support secure connections.</p> <p>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.</p> <p>Exception Details: System.Net.Mail.SmtpException: Server does not support secure connections.</p> <p>Source Error:</p> <blockquote> <p>Line 78: smtp.Credentials = new System.Net.NetworkCredential("pramuk97@gmail.com", "mukund1375");Line 79: smtp.EnableSsl = true;Line 80: smtp.Send(mail); Line 81: TextBox5.Text = "message sent";Line 82: TextBox5.ReadOnly = true;</p> <p>Source File: E:\bhsbiet\bhsbiet\home.aspx.cs Line: 80</p> </blockquote> <p>Stack Trace:</p> <blockquote> <p>[SmtpException: Server does not support secure connections.] System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +1223423 System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +222 System.Net.Mail.SmtpClient.GetConnection() +50 System.Net.Mail.SmtpClient.Send(MailMessage message) +1772 bhsbiet.home.buttonx_click(Object sender, EventArgs e) in E:\bhsbiet\bhsbiet\home.aspx.cs:80 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload