• All
  • Free Web Hosting
  • Category 2
gravatar

How to send mail in php?

<?php
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = 'YourSite.com.ph' . "\r\n";
$email = "test@yahoo.com"; //you can make this a dynamic one.
$subject = "test";
$message = "Name:"
            . "       "
//            . $name
            . "\n"
            . "Age:"
            . "\n"
            . "Address:"
            . "        "
//            . $address
//            . "\n"
            . "Email:"
            . "    "
            . $email;
            . "\n"
            . "===================================================="
            . "\n"
            . "* This is a system-generated e-mail. Do not reply.
";

mail($email, $subject, $message, "From: $headers");
?>