require_once(“class.phpmailer.php”);
require_once(“class.smtp.php”);
$oSmtpEmail = new PHPMailer;

error_reporting(0);
if($_POST[‘_hidCheckSubmit’] == “2”)
{
//print_r($_POST);
$message=’Dear Admin,

Please find the Query details Send by ‘.ucfirst($_POST[‘fld_first_name’]).’

‘;
$message.=’Details are as below:-

‘;

if($_POST[‘fld_month’])
{
$message.=’Month of Exam : ‘.$_POST[‘fld_month’].’

‘;
}

if($_POST[‘fld_service’] == 1)
{
$message.=’Service : Mold Assessor ($500)

‘;
}
else if($_POST[‘fld_service’] == 2)
{
$message.=’Service : Mold Remediator ($500)

‘;
}
else if($_POST[‘fld_service’] == 3)
{
$message.=’Service : Both licenses ($1000)

‘;
}

if($_POST[‘fld_first_name’])
{
$message.=’Name : ‘.ucfirst($_POST[‘fld_first_name’]).’ ‘.ucfirst($_POST[‘fld_last_name’]).’

‘;
}
if($_POST[‘fld_email’])
{
$message.=’Email Id : ‘.$_POST[‘fld_email’].’

‘;
}
if($_POST[‘fld_phone’])
{
$message.=’Phone Number : ‘.$_POST[‘fld_phone’].’

‘;
}

$message.=’Team’;
//print_r($message);
//exit();
$from = $_POST[‘fld_first_name’];
$to=’linda@mold-free.org’;
$sSubject = “Signup Enquiry”;
/*$headers = “Content-Type: text/html; charset=iso-8859-1\n”;
$headers .= ‘From: ‘.$_POST[‘fld_first_name’].'<‘.$_POST[‘fld_email’].’>’.”\r\n”;
$mail=@mail($to,$sSubject,stripcslashes($message),$headers);
header(“Location:thank-you.html”); */

$oSmtpEmail->isSMTP();
$oSmtpEmail->Host = ‘smtp.gmail.com’;
$oSmtpEmail->SMTPAuth = true;
$oSmtpEmail->Username = ‘freemoldtraining@gmail.com’;
$oSmtpEmail->Password = ‘freemold15’;
$oSmtpEmail->SMTPSecure = ‘tls’;
$oSmtpEmail->Port = ‘587’;
$oSmtpEmail->SMTPSecure = ‘ssl’;
$oSmtpEmail->Port = ‘465’;
$oSmtpEmail->isHTML(true);

$oSmtpEmail->Subject = ‘Signup Enquiry’; // Mail Subject
$oSmtpEmail->Body = $message; // Mail Body
$oSmtpEmail->addAddress($to); // Add a recipient
$oSmtpEmail->From = $aMailValues[3]; // From Email
$oSmtpEmail->FromName = ‘info@free-mold-training.org’; // From Name
//$oSmtpEmail->addBCC(‘vking.sarasota@gmail’); // Add a recipient

if($oSmtpEmail->send()) {

header(“Location:thank-you.html”);
}else{
header(“Location:index.html”);
}
}

?>