Hello. I am trying to get the ability to email from my web site through php. I downloaded the phpmailer program and followed the tutorial to the letter and I keep getting this error. Message was not sent.Mailer error: SMTP Error: Could not connect to SMTP host. I am just at a total loss.
My code is here:
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtpout.secureserver.net:110"; // SMTP server
$mail-> Host = "pop.secureserver.net";
$mail->Username = "user@example.com";
$mail->Password = "pass";
$mail->From = "user@example.com";
$mail->AddAddress("testmail@yahoo.com");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
?>