Sending information from Form to e-mail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bf747
    New Member
    • May 2010
    • 3

    Sending information from Form to e-mail

    I have created a form on the web as html pages and want to make the submit button to send a form to an e-mail or create a form where the owner of the website can access, print the form and start on processing it.
  • YarrOfDoom
    Recognized Expert Top Contributor
    • Aug 2007
    • 1243

    #2
    The most simple way is to set the action-attribute to MAILTO: followed by the mail-adress you want to send it to, but that will work by opening the user's mail-program and filling out the body and reciever for them.

    A more elegant way is to create or find a server-side script which will process the data in the form and send the mail from the server. This way the form will act like a regular form towards the user. A quick search on the web will probably get you such a script no time.

    Comment

    • bf747
      New Member
      • May 2010
      • 3

      #3
      Originally posted by YarrOfDoom
      The most simple way is to set the action-attribute to MAILTO: followed by the mail-adress you want to send it to, but that will work by opening the user's mail-program and filling out the body and reciever for them.

      A more elegant way is to create or find a server-side script which will process the data in the form and send the mail from the server. This way the form will act like a regular form towards the user. A quick search on the web will probably get you such a script no time.
      the webpage is

      and when the person needs to submit the form I want to get the same webpage in a same form filled in with a data and submitted to the e-mail.
      I am very much new on this and kind of hard for me to follow. Can you give me more details? Did I explain correctly? thank you for your suggestions and help.

      Comment

      • YarrOfDoom
        Recognized Expert Top Contributor
        • Aug 2007
        • 1243

        #4
        As you can read on this page, your <input>-tags should be grouped together in a <form>-tag (your page only seems to have the ending-tag for that by the way). The <form>-tag has an attribute action which you can set to the url the form has to be sent to when the user clicks <input> with type set to submit. If you put "MAILTO:" followed by an email-adress, the website will open the user's email-client for a new mail with the form data in the body. This however, is not very user-friendly, and the form data will not be very easily readable.

        A better solution is to set the action-attribute to a serverside script (written in PHP, ASP, Python, ... whatever you prefer), which will structure the data when recieved and send it trough to an email-address specified in the script, without bothering the user at all with this. You can choose to write this script yourself, or try to find one on the internet which suits your needs.

        edit: I just realised this is just a more extended version of my previous post, but I hope it's of use to you anyway :)

        Comment

        • bf747
          New Member
          • May 2010
          • 3

          #5
          Originally posted by YarrOfDoom
          As you can read on this page, your <input>-tags should be grouped together in a <form>-tag (your page only seems to have the ending-tag for that by the way). The <form>-tag has an attribute action which you can set to the url the form has to be sent to when the user clicks <input> with type set to submit. If you put "MAILTO:" followed by an email-adress, the website will open the user's email-client for a new mail with the form data in the body. This however, is not very user-friendly, and the form data will not be very easily readable.

          A better solution is to set the action-attribute to a serverside script (written in PHP, ASP, Python, ... whatever you prefer), which will structure the data when recieved and send it trough to an email-address specified in the script, without bothering the user at all with this. You can choose to write this script yourself, or try to find one on the internet which suits your needs.

          edit: I just realised this is just a more extended version of my previous post, but I hope it's of use to you anyway :)
          Thank you very much. I will follow the link you send me.

          Comment

          Working...