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. Posting data from Email to ASP.NET Page

Posting data from Email to ASP.NET Page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 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.
  • A Offline
    A Offline
    Ashwani_kumar
    wrote on last edited by
    #1

    I need to post some data from the mail message body to ASP.Net Page. The mail contains few radio buttons and a submit button. On the click of submit button i need to post data to the ASP.Net Web page.

    Ashwani

    H N 2 Replies Last reply
    0
    • A Ashwani_kumar

      I need to post some data from the mail message body to ASP.Net Page. The mail contains few radio buttons and a submit button. On the click of submit button i need to post data to the ASP.Net Web page.

      Ashwani

      H Offline
      H Offline
      honeyss
      wrote on last edited by
      #2

      try this MailMessage objEmail = new MailMessage(); objEmail.To = txtTo.Text; objEmail.From = txtFrom.Text; objEmail.Cc = txtCc.Text; objEmail.Subject = "Test Email"; objEmail.Body = txtName.Text + ", " + txtComments.Text; objEmail.Priority = MailPriority.High; //SmtpMail.SmtpServer = "localhost"; try{ SmtpMail.Send(objEmail); Response.Write("Your Email has been sent sucessfully - Thank You"); } catch (Exception exc){ Response.Write("Send failure: " + exc.ToString()); }

      A 1 Reply Last reply
      0
      • H honeyss

        try this MailMessage objEmail = new MailMessage(); objEmail.To = txtTo.Text; objEmail.From = txtFrom.Text; objEmail.Cc = txtCc.Text; objEmail.Subject = "Test Email"; objEmail.Body = txtName.Text + ", " + txtComments.Text; objEmail.Priority = MailPriority.High; //SmtpMail.SmtpServer = "localhost"; try{ SmtpMail.Send(objEmail); Response.Write("Your Email has been sent sucessfully - Thank You"); } catch (Exception exc){ Response.Write("Send failure: " + exc.ToString()); }

        A Offline
        A Offline
        Ashwani_kumar
        wrote on last edited by
        #3

        My question is different. I know how to send email. Actually email is send to the user. The body of the mail contains the HTML tages that forms the complete html page. Now I want to post the information from that HTML page to ASP.Net page.

        Ashwani

        1 Reply Last reply
        0
        • A Ashwani_kumar

          I need to post some data from the mail message body to ASP.Net Page. The mail contains few radio buttons and a submit button. On the click of submit button i need to post data to the ASP.Net Web page.

          Ashwani

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Hi Make the action attribute of your form to your aspx page. Change method to get. And in ASPX page get these values using Request.QueryString method. But I am not sure that this will work because, usually email providers won't allow any executable scripts on the body. That will cause severe security problems. Some providers may spam this type of messages. Tell me on what scenario you need to do like this ? Instead of doing this you can send a link where users can do the same. Happy Programming

          Navaneeth My Website

          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