I am trying to get PHP Mailer Script to redirect after the message has been sent.
if(!$mail->Send()) {
$data['success'] = false;
$data['message'] = 'There were errors with your form, please refer to the warnings!';
} else {
$data['success'] = true;
$data['message'] = 'Success! Your message was sent. I will contact you shortly.';
}
}
echo json_encode($data);