problem in sending mail using gmail account
-
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
check this http://www.codeproject.com/KB/IP/Sending\_Emails\_From\_GMAIL.aspx
Abhishek Sur My Latest Articles Working with Excel using MDAC
Basics on LINQ and Lambda Expressions
Create .NET Templates -
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