Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Sending submitted forums info to e-mail

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.
  • 2
  • 2
1 Solution
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.
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.
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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now