Having an issue with my mailer script. When an email is sent it doesn't redirect to my chosen page it sits on mail.php
which os the logic file. Having some issues understanding what the top section is asking me for too.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<?php
require 'c:\php\includes\PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.website.com'; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'my@website.com'; // SMTP username
$mail->Password = '******'; // Enable encryption, 'ssl' also accepted
$mail->Port = 25;
$mail->From = 'http://iamdanbarrett.com';
$mail->FromName = 'Contact Form';
$mail->addAddress('iamdanbarrett.com'); // Name is optional
$mail->WordWrap = 50; // Set word wrap to 50 characters
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'General Enquiries';
$mail->Body = "<html><body>Name: " . $_POST["Name"] . "<br><br>Email: " . $_POST["Email"] . "<br><br>Message: " . $_POST["Message"];
// $mail->Body = 'Details below:<br><hr><br><br><b>Shortlist:</b><br>' . $_POST["strShortlist"] . '<br><br><b>Company:</b> ' . $_POST["strCompany"] . '<br><br><b>Full Name:</b> ' . $_POST["strFullname"] . '<br><br><b>Email:</b> ' . $_POST["strEmail"] . '<br><br><b>Contact No:</b> ' . $_POST["strContactNo"] . '<br><br><b>No of People:</b> ' . $_POST["strNoOfPeople"] . '<br><br><b>Start Date:</b> ' . $_POST["strDate"] . '<br><br><b>Requirements:</b> ' . $_POST["strRequirements"] . '<br><br><b>Other:</b> ' . $_POST["strOther"] . '<br><br><b>Salesperson:</b> ' . $_POST["strSalesperson"];
if(!$mail->send()) {
echo '';
echo '';
exit;
} else {
}
?>
</head>
<body>
<script>
$( document ).ready(function() {
window.location.href = "http://iamdanbarrett.com/;
});
</script>