Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

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


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.
$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
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]