problem in sending mail
-
hiii i m using asp.net 2.0 using c# i have made a application which have a form after filling that form it will send mail automatic.it was working till morning, but now it will send error The remote certificate is invalid according to the validation procedure. code is: SmtpClient client = new SmtpClient(); client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; client.Host = "smtp.gmail.com"; client.Port = 587; System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("rma.maksat@gmail.com", "******"); client.UseDefaultCredentials = false; client.Credentials = credentials; MailMessage msg = new MailMessage(); msg.From = new MailAddress("rma.maksat@gmail.com"); msg.To.Add(new MailAddress("prateekfgiet@gmail.com")); msg.To.Add(new MailAddress("prateek_fgiet@yahoo.com")); msg.To.Add(new MailAddress("prateekfgiet@live.in")); //msg.To.Add(new MailAddress("TextBox10.Text")); msg.Subject = "New RMA No:'" + Label3.Text + "'"; msg.IsBodyHtml = true; msg.Body = "<html><body><b>RMA No is:</b>'" + Label3.Text + "',<br /><p><b>Srno is:</b>'" + TextBox1.Text + "',<br /><b>Product Name:</b>'" + TextBox3.Text + "',<br /><b>Problem Description:</b>'" + TextBox5.Text + "'</p>,<p><b>Company Name:</b>'" + TextBox6.Text + "',<br /><b>Contact Number:</b>'" + TextBox8.Text + "',<br /><b>Entry By:</b>'" + TextBox4.Text + "',<br /></p> </body></html>"; client.Send(msg); please help me thanks in advance
-
hiii i m using asp.net 2.0 using c# i have made a application which have a form after filling that form it will send mail automatic.it was working till morning, but now it will send error The remote certificate is invalid according to the validation procedure. code is: SmtpClient client = new SmtpClient(); client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; client.Host = "smtp.gmail.com"; client.Port = 587; System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("rma.maksat@gmail.com", "******"); client.UseDefaultCredentials = false; client.Credentials = credentials; MailMessage msg = new MailMessage(); msg.From = new MailAddress("rma.maksat@gmail.com"); msg.To.Add(new MailAddress("prateekfgiet@gmail.com")); msg.To.Add(new MailAddress("prateek_fgiet@yahoo.com")); msg.To.Add(new MailAddress("prateekfgiet@live.in")); //msg.To.Add(new MailAddress("TextBox10.Text")); msg.Subject = "New RMA No:'" + Label3.Text + "'"; msg.IsBodyHtml = true; msg.Body = "<html><body><b>RMA No is:</b>'" + Label3.Text + "',<br /><p><b>Srno is:</b>'" + TextBox1.Text + "',<br /><b>Product Name:</b>'" + TextBox3.Text + "',<br /><b>Problem Description:</b>'" + TextBox5.Text + "'</p>,<p><b>Company Name:</b>'" + TextBox6.Text + "',<br /><b>Contact Number:</b>'" + TextBox8.Text + "',<br /><b>Entry By:</b>'" + TextBox4.Text + "',<br /></p> </body></html>"; client.Send(msg); please help me thanks in advance
-
See this article and questions section as well [^]
Education is not a way to escape poverty — it is a way of fighting it.
it was working till morning but now its not working,where is problem in the code and how can i resolve it please help me
-
it was working till morning but now its not working,where is problem in the code and how can i resolve it please help me
are you using any session.
Padmanabhan My Articles[^]
-
are you using any session.
Padmanabhan My Articles[^]
no i m not using session. i have post the code it was working till morning now its giving error