PHP Mail Function
<?php
$to = "info@domain.com";
$subject = "Inquiry from Website";
$msg="Inquiry from Website";
$msg=$msg."<br>";
$msg=$msg."\n =============#==============#===============";
$msg=$msg."<br>";
$msg=$msg."<br>";
$msg=$msg."\n Name : xyz";
$msg=$msg."<br>";
$msg=$msg."<br>";
$msg=$msg."\n Mobile : 1234567890";
$msg=$msg."<br>";$msg=$msg."<br>";
$msg=$msg."\n Email : xyz@gmail.com";
$msg=$msg."<br>";
$msg=$msg."<br>";
$msg=$msg."\n Message : hey how are you?";
$msg=$msg."<br>";
$msg=$msg."<br>";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1". "\r\n";
$headers .= "To:".$to. "\r\n";
$headers .= "From: info@domain.com" . "\r\n";
if( mail($to,$subject,$msg,$headers))
{
echo "<script>alert('Your Inquiry Sended Successfully. We will get back to you shortly.');</script>";
}
else
{
echo "<script>alert('Some Error Occured Please Try Again');</script>";
}
?>
0 Comments