IsSMTP(); // set mailer to use SMTP $mail->Host = "aerialinstallers.org"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "send@aerialinstallers.org"; // SMTP username $mail->Password = "aK]FrI5nL}~k"; // SMTP password $mail->AddAddress("chris.aerialsdirect.tv@gmail.com", "Info at Aerial Installers"); //Email address where you wish to receive/collect those emails. if (isset($_FILES['uploadFile']) && $_FILES['uploadFile']['error'] == UPLOAD_ERR_OK) { $mail->AddAttachment($_FILES['uploadFile']['tmp_name'],$_FILES['uploadFile']['name']); } //Validation for the forms function email_is_valid($email) { return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i',$email); } if (!email_is_valid($email)) { $err = 'Email Address is not valid
'; goto cont; } if(empty($_POST['email'])){ $err = 'Email address cannot be empty
'; goto cont; } if(empty($_POST['name'])){ $err = 'Name cannot be empty
'; goto cont; } if(empty($_POST['phone'])){ $err = 'Phone cannot be empty
'; goto cont; } if(empty($_POST['postcode'])){ $err = 'Postal Code cannot be empty


'; goto cont; } if(empty($_POST['message'])){ $err = 'Enquiry cannot be empty


'; goto cont; } $mail->IsHTML(true); // set email format to HTML $mail->From = $email; $mail->FromName = "Aerial Installers.org"; $mail->Subject = "Email From $senderName From ".$current_url; $mail->Body = "Contact Us - From $sitename
Sent By: $senderName
Email: $email
Phone : $phone
Post code: $postCode
Comments: $Comments
Date Send: $date"; $redirect_url = "thankyou.html"; if(!$mail->Send()) { echo "Message could not be sent.

"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } else $err="Thank You
Your enquiry has been received and someone will contact you shortly.

"; } else if(!empty($_POST) && !chk_crypt($_POST['code'])) $inv_captcha= true; cont: ?>