<?php
//include("phpmailerInclude.php");
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'src/Exception.php';
require 'src/PHPMailer.php';
require 'src/SMTP.php';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 0; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages
$mail->Host = "mail.bluezanzibartour.co.tz"; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6
$mail->Port = 465; // TLS only
$mail->SMTPSecure = 'tls'; // ssl is depracated
$mail->SMTPAuth = true;
$mail->Username = "no-reply@bluezanzibartour.co.tz";
$mail->Password = "cfdfG*BfNMDr";
$mail->setFrom("info@bluezanzibartour.co.tz", "Blue Zanzibar Tours & Travel"); //email from
$mail->addAddress($Clientemail,$fullName); //email to
$mail->addReplyTo($Clientemail,$fullName); // replyto
$mail->addCC("info@bluezanzibartour.co.tz", "Blue Zanzibar Tours & Travel"); //Cc
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = $subject;
$mail->Body = $htmlEmail;
$mail->AltBody = $htmlEmail;
//$mail->msgHTML("test body");
//$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded,
//$mail->AltBody = 'HTML messaging not supported';
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file
if(!$mail->send()){
//echo "Mailer Error: " . $mail->ErrorInfo;
?>
<script type="text/javascript">
swal("", "Booking Confirmed! Thank your for Booking with us! Your Confirmation email might delay please contact us in case through email", "success");
</script>
<?php
}else{
//echo "Message sent!";
?>
<script type="text/javascript">
swal("", "Booking Confirmed! Thank your for Booking with us. Check your Email for Confirmation !", "success");
</script>
<?php
}
;?>