6 Replies Latest reply on Sep 20, 2008 9:39 AM by Newsgroup_User

    How to send form data to email?

    ghleo
      Hi

      I’m building a website with a feedback form that users can submit it. When the form is submitted, the form’s data will be sent to my email address. There is not database so I try to use simple JavaScript to achieve this function.

      Does anyone know how to send a form data to email?
      Also is it possible to test the function from local host?

      Please give some advice.

      Thank You.
        • 1. Re: How to send form data to email?
          Level 7
          There are only two ways to process form data -

          1. Use mailto:name@example.com as the action of the form
          2. Use a server-side scripting method to a) harvest the form's data, b)
          process it in some manner, e.g., enter it into a database, c) formulate and
          send an email to one or more email recipients, and d) redirect the visitor
          to some ending page

          Method 1 is quite simple, and is also the least reliable. It depends both
          on your visitor having an email client already installed on their computer -
          this eliminates public computers, or home users without email clients
          installed (more and more it seems) - and on the installed email client
          responding to
          the mailto call. It is not possible to use this method *and* send the
          visitor to a
          thank you page as well.

          Method 2a is the preferred method, since it eliminates the problems of
          method
          1, but it means that you have to grapple with server-scripting somehow (ASP,
          CF, PHP, perl, etc.).

          Method 2b would be to use some third-party form processing, like
          http://www.bebosoft.com/products/formstogo/.

          You would have to decide which of these methods is best for your needs,
          but if it's Method 2a, then start by asking your host what they provide for
          form
          processing. If it's 2b, then read their FAQ/instructions carefully.

          Note - neither of these methods use javascript, as I do not think it's even
          possible to use client-side scripting for this purpose. This functionality
          must reside on the server.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "ghleo" <webforumsuser@macromedia.com> wrote in message
          news:gavt4v$rfb$1@forums.macromedia.com...
          > Hi
          >
          > I?m building a website with a feedback form that users can submit it. When
          > the
          > form is submitted, the form?s data will be sent to my email address. There
          > is
          > not database so I try to use simple JavaScript to achieve this function.
          >
          > Does anyone know how to send a form data to email?
          > Also is it possible to test the function from local host?
          >
          > Please give some advice.
          >
          > Thank You.
          >
          >

          • 2. Re: How to send form data to email?
            Level 7
            If your server supports PHP you could give this a try
            http://www.geekministry.com/formbuilder/

            ghleo skrev:
            > Hi
            >
            > I?m building a website with a feedback form that users can submit it. When the
            > form is submitted, the form?s data will be sent to my email address. There is
            > not database so I try to use simple JavaScript to achieve this function.
            >
            > Does anyone know how to send a form data to email?
            > Also is it possible to test the function from local host?
            >
            > Please give some advice.
            >
            > Thank You.
            >
            >
            >

            --
            Kim
            ---------------------------
            http://www.geekministry.com

            • 3. Re: How to send form data to email?
              Yannorlando
              Thank you, I'm having the same problem but in my case this is worse since the technical support from the server I'm using is not able to help me, I think the best for me is to move to an other server company...

              Do you know any good one with reliable tech support?

              Thank you.
              • 4. Re: How to send form data to email?
                Level 7
                There are plenty. What are your criteria?

                --
                Murray --- ICQ 71997575
                Adobe Community Expert
                (If you *MUST* email me, don't LAUGH when you do so!)
                ==================
                http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                ==================


                "Yannorlando" <webforumsuser@macromedia.com> wrote in message
                news:gb0a42$d18$1@forums.macromedia.com...
                > Thank you, I'm having the same problem but in my case this is worse since
                > the
                > technical support from the server I'm using is not able to help me, I
                > think the
                > best for me is to move to an other server company...
                >
                > Do you know any good one with reliable tech support?
                >
                > Thank you.
                >

                • 5. How to send form data to email?
                  ghleo Level 1
                  I tried the first method ‘mailto:myemailadress@msn.com’ in the form similar to this~

                  <form action="mailto:myemailaddress@msn.com" method="post" name="form1" id="form1" enctype="text/plain">

                  <input name="txtemail" type="text" id="txtemail" />
                  <input type="text" name="txtfname" id="txtfname" />
                  <input type="text" name="txtlname" id="txtlname" />
                  <textarea name="txtcom" id="txtcom" cols="60" rows="10"></textarea>
                  <input name="btnsubmit" type="submit" id="btn" onactivate="MM_validateForm('txtemail','','RisEmail','txtfname','','R','txtlname','','R', 'txtcom','','R')" onclick="MM_goToURL('parent','thankyou.html');return document.MM_returnValue" value="Submit"/>

                  </form>

                  But, it didn’t go through my email.
                  Is that because I don’t have a hosting server for my website yet? I tried this one on my computer connected to the internet.

                  Also for the method#2, do I have to have a hosting server for my website to test this method?
                  I tired few free FormMail and CGI programming to test sending email, but I did stuck with a step where I need to supply URL (e.g. <form action=” http://somesite.com/prog/adduser” … ….>) which I have no idea what URL address I need to supply.

                  To do the testing of sending form data to email, do I have to have a web hosting server?

                  Thank You~

                  • 6. Re: How to send form data to email?
                    Level 7
                    > Is that because I don?t have a hosting server for my website yet? I tried
                    > this one on my computer connected to the internet.

                    When you submitted the form, your email client should have opened with the
                    To: field filled in. What do you use as an email client? If you are only
                    using a browser with hotmail or something like that, you have just
                    discovered one of the largest drawbacks to the use of the mailto: method.

                    > <input name="btnsubmit" type="submit" id="btn"
                    > onactivate="MM_validateForm('txtemail','','RisEmail','txtfname','','R','txtlname
                    > ','','R','txtcom','','R')"
                    > onclick="MM_goToURL('parent','thankyou.html');return
                    > document.MM_returnValue" value="Submit"/>

                    By the way, this won't work either. The validation behavior must be applied
                    to the <form> tag, not the Submit button.

                    > Also for the method#2, do I have to have a hosting server for my website
                    > to
                    > test this method?

                    Unless you have set up a local webserver that can process your perl script,
                    yes.

                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    ==================


                    "ghleo" <webforumsuser@macromedia.com> wrote in message
                    news:gb14f3$fb0$1@forums.macromedia.com...
                    >I tried the first method you ?mailto:myemailadress@msn.com? in the form
                    > similar to this~
                    >
                    > <form action="mailto:myemailaddress@msn.com" method="post" name="form1"
                    > id="form1" enctype="text/plain">
                    >
                    > <input name="txtemail" type="text" id="txtemail" />
                    > <input type="text" name="txtfname" id="txtfname" />
                    > <input type="text" name="txtlname" id="txtlname" />
                    > <textarea name="txtcom" id="txtcom" cols="60" rows="10"></textarea>
                    > <input name="btnsubmit" type="submit" id="btn"
                    > onactivate="MM_validateForm('txtemail','','RisEmail','txtfname','','R','txtlname
                    > ','','R','txtcom','','R')"
                    > onclick="MM_goToURL('parent','thankyou.html');return
                    > document.MM_returnValue" value="Submit"/>
                    >
                    > </form>
                    >
                    > But, it didn?t go through my email.
                    > Is that because I don?t have a hosting server for my website yet? I tried
                    > this one on my computer connected to the internet.
                    >
                    > Also for the method#2, do I have to have a hosting server for my website
                    > to
                    > test this method?
                    > I tired few free FormMail and CGI programming to test sending email, but I
                    > did
                    > stuck with a step where I need to supply URL (e.g. <form action=?
                    > http://somesite.com/prog/adduser? ? ?.>) which I have no idea what UPL
                    > address
                    > I need to supply.
                    >
                    > To do test the sending form data to email, do I have to have a web hosting
                    > server?
                    >
                    > Thank You~
                    >
                    >
                    >