if(isset($_POST['Checkbtn']))
{
$from = $_POST['emailid'];
$sub = $_POST['subject'];
$msg = $_POST['msg'];
gomail($from,$sub,$msg);
}
else
{
?>
}
?>
function gomail($from,$sub,$msg)
{
$email = "elavarasan@bicpu.edu.in";
$to = $email;
$from = $from;
$subject = $sub;
$headers = "From: $from";
$body = $msg;
if (mail($to, $subject, $body, $headers)) {
passout();
} else {
echo("Message delivery failed...Plz write to us
");
echo "";
}
}
function passout()
{
echo "Mail Sent successfully...";
echo "";
echo "";
}
?>