Saturday, May 19, 2012

Sending Mail in PHP


<?php


$to = $_POST['to'];
$sub = $_POST['sub'];
$msg = $_POST['msg'];
$header = "From: chinmay_youthmail@yahoo.co.in";
$report = mail($to,$sub,$msg,$header);


if($report)
{
echo "Mail transfered successfully.......";
}
else
{
echo "There is error in sending mail....";
}
?>

No comments:

Post a Comment