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

problem in sending mail

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlasp-netcom
5 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

    B 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
      #2

      See this article and questions section as well [^]

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

      P 1 Reply Last reply
      0
      • B Baran M

        See this article and questions section as well [^]

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

        P Offline
        P Offline
        prateekfgiet
        wrote on last edited by
        #3

        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

        P 1 Reply Last reply
        0
        • P prateekfgiet

          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

          P Offline
          P Offline
          padmanabhan N
          wrote on last edited by
          #4

          are you using any session.

          Padmanabhan My Articles[^]

          P 1 Reply Last reply
          0
          • P padmanabhan N

            are you using any session.

            Padmanabhan My Articles[^]

            P Offline
            P Offline
            prateekfgiet
            wrote on last edited by
            #5

            no i m not using session. i have post the code it was working till morning now its giving error

            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