<?php 
error_reporting(0);
  require 'mail.php';
    $mail = new Mail();
  //  INFO@HORIZONLIMITED.NET 
    $docter_name=$_POST["dctr"];
  $contact=$_POST["cnt"];
    $email=$_POST["email"];
      $reason=$_POST["rsn"];
      $dctrname=$_POST["dctrname"];
      $date=$_POST["date"];
      $ins=$_POST["ins"];
      $ins1=$_POST["ins1"];
        $newp=$_POST["newp"];
          $regno=$_POST["regno"];
            
    $from='navajith@corbetech.com';
    $mail->protocol = 'mail';
    $mail->parameter = '';
    $mail->smtp_hostname = '';
    $mail->smtp_username = '';
    $mail->smtp_password = '';
    $mail->smtp_port = '';
    $mail->smtp_timeout = '';
//$mail->setTo('mail@emmay.in');
  $mail->setTo('kakhilesh55@gmail.com');
    $mail->setFrom($from);
    $mail->setSender('akhilesh@corbetech.com');
    $mail->setSubject("alroudha appointment");
    $mail->setText("Name:".$name."<br />Contact Number:".$contact."</br>Reason:".$reason."</br>Docter name:".$dctrname."</br>Insurence:".$ins."</br>Patient".$newp."</br>Registration Number:".$regno );
    $mail->send();
//if(!$mail->Send())
//echo "Message was not sent <br />PHPMailer Error:" . $mail->ErrorInfo;
?>
<script>
alert("Your message was sent successfully.");
window.location="dr-form.php";
</script>