<?php
if(isset($_POST['contact'])){
   

    $Subject = 'Contact Us';
    $ToEmail = 'ajayfivedesign@gmail.com';
    $me=$_POST['name'];
    $mailheader = 'From : '.$_POST['email'].'\r\n';
    $mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
    $mailheader = "MIME-Version: 1.0" . "\r\n";
    $mailheader .= "Content-type:text/html;charset=UTF-8"."\r\n";
    $MESSAGE_BODY= "";
    $MESSAGE_BODY .= "Name :- ".$_POST["name"]."<br>";
    $MESSAGE_BODY .= "Email :- ".$_POST["email"]."<br>";
    $MESSAGE_BODY .= "Mobile :- ".$_POST["phone"]."<br>";
    $MESSAGE_BODY .= "Message :- ".$_POST["message"]."<br>";    
    if(mail($ToEmail, $Subject, $MESSAGE_BODY, $mailheader)){
        echo "<script> alert('Thank you " .$me. " your message was sent'); </script>";
        echo "<script> window.location.href='contact.php'; </script>";
    }else{
        echo "<script> alert('Mail Not send'); </script>";
        echo "<script> window.location.href='contact.php'; </script>";
    }
}
?>










<!-- start equiry section --->
<?php
if(isset($_POST['subscribe'])){
   

    $Subject = 'NEWSLETTER';
    $ToEmail = 'ashapuraagencypune@gmail.com';
    $me=$_POST['email'];
    $mailheader = 'From : '.$_POST['email'].'\r\n';
    $mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
    $mailheader = "MIME-Version: 1.0" . "\r\n";
    $mailheader .= "Content-type:text/html;charset=UTF-8"."\r\n";
    $MESSAGE_BODY= "";
    $MESSAGE_BODY .= "Email :- ".$_POST["email"]."<br>";   
    if(mail($ToEmail, $Subject, $MESSAGE_BODY, $mailheader)){
        echo "<script> alert('Thank you " .$me. " your message was sent'); </script>";
        echo "<script> window.location.href='index.php'; </script>";
    }else{
        echo "<script> alert('Mail Not send'); </script>";
        echo "<script> window.location.href='index.php'; </script>";
    }
}
?>
<!-- end enquiry section --->