Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem in sending mail using gmail account

problem in sending mail using gmail account

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlasp-netcom
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prateekfgiet
    wrote on last edited by
    #1

    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

    A B 2 Replies Last reply
    0
    • P prateekfgiet

      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

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • P prateekfgiet

        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

        B Offline
        B Offline
        Baran M
        wrote on last edited by
        #3

        you posted your question again. Please post some more detailed error with Stack trace. Repeating the same question wont help.

        Education is not a way to escape poverty — it is a way of fighting it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups