Having trouble with smtp on a php form. Here is the code:
// specify main and backup server
$mail->Host = "I'VE PUT MAIN DOMAIN SERVER HERE";
// turn on SMTP authentication
$mail->SMTPAuth = true;
// SMTP username
$mail->Username = "I'VE PUT EMAIL USERNAME HERE";
$mail->Password = "I'VE PUT EMAIKL PASSWORD HERE";
$mail->From = $mail->Username;
$mail->FromName = "From Name";
// Email address on which you wish to collect contact information from your site form.
// name is optional
$mail->AddAddress("I'VE PUT EMAIL ADDRESS HERE", "name");
// User will be redirected to this URL after submitting the form.
$redirect_url = "success.htm";
// set word wrap to 50 characters
$mail->WordWrap = 50;
// set email format to HTML
$mail->IsHTML(true);
$name = check_input($_POST['name'], "Enter your name, it is mandatory. Click the back button on your browser and fill in the required fields.");
$email = check_input($_POST['email'], "Enter your email address, it is mandatory. Click the back button on your browser and fill in the required fields.");
$phone = check_input($_POST['phone']);
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
die($problem);
}
return $data;
}
header('Location: success.htm');
?>
When submit is selected, it does go through to the 'success' page, but mails are not being delivered. Any advice?

