Sending submitted forums info to e-mail

Posted on 2003-03-31
Medium Priority
Last Modified: 2010-04-09
I need to know what to add to the HTML to have it send a fourm to my e-mail. I have created the fourm in HTML; I just do not know what to put to make it send to my e-mail then open up a new page.
Question by:PhoenixFire
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 17

Expert Comment

ID: 8244383

Expert Comment

ID: 8256781
If that's a spelling mistake and I understood correctly, you need to send the results from a form to an e-mail. If that's the case, you can do it like this:

<FORM ACTION="mailto:santa@northpole.org" METHOD="post" ENCTYPE="text/plain">

Note that mailto uses your default e-mail client in order to send the results. You can avoid this by using server-side scripting.

Again, I apologize if I understood wrong.
LVL 17

Expert Comment

ID: 8256868
Oooh. Emailing form data.

Well the mailto: method is exceptionally unreliably and fails about half the time.

http://www.cs.tut.fi/~jkorpela/forms/index.html is a good guide.

Expert Comment

ID: 8259510
I use PHP and the mail() function. An example:

<form  method="post" action="example.php">
   <p>Name:</p> <input type="text" name="name" size="20">

   <p>Comments:</p> <textarea name="comments" rows="10" cols="50" ></textarea>

   <input type="submit" name="Submit" value="Submit">


After that you just need to write something like this, insert it into an html file and save it as example.php:

 $data .= "Name: $name\n";  -The variable $data gets its value from the variable $name that was used in the form-
 $data .= "Comments: $comments\n"; -The value from the variable $comments is being added to the variable $data-

mail ("test@example.org","Web Site Form",$message); -Send a mail to the address you want, followed by the subject and the data-
echo ("Thanks, $name"); -Just a little appreciation !-

It's that simple - the only drawback is that PHP is a server side scripting language, which means that it has to be installed to the server for everything to work.

Oh, I almost forgot - you can also do it in Frontpage :P

Accepted Solution

ahprod earned 200 total points
ID: 8266355
You can use CGI.pm to take the stuff from the forms and email it anywhere. CGI isn't hard to install and configure, and usually comes standard with Apache. Check here to learn more about using it: http://www.devshed.com/Server_Side/Perl/CGIpmBasics/page7.html

Featured Post

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question