Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 27 people (63%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How to submit form direct to email

Mar 28th, 2008 16:43
ha mo, Abhijith Vijayan, Susan Braun,


We can send mails using php mail() functions. Here is a simple code for 
sending mail through php scrpit.
<?php
$to = "[email protected]";
$subject = "Php test mail";
$body = "Test mail for php mail()";
if (mail($to, $subject, $body)) {
  echo("<p>Yes you have done it</p>");
 } else {
  echo("<p>Oops try once more..</p>");
 }
?>
 '$to' specify the recipient address.
 '$subject' specify mail subject.
 '$body' specify the mail body.
                         With these function you can send mails. So You
have 
to do is just recieve the values from the html forms and assign them to the 
appropriate variables.
If you have any doubts contact me on [email protected]
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com