Hello i have a problem witth php mailer my navigator display me always this error"SMTP connect() failed."
and this s my code
<?php
require_once("class.phpmailer.php");
require_once("class.smtp.php");
$mail = new PHPMailer;
//Enable SMTP debugging.
$mail->SMTPDebug = 3;
//Set PHPMailer to use SMTP.
$mail->isSMTP();
//Set SMTP host name
$mail->Host = "smtp.xxxxxx";
//Set this to true if SMTP host requires authentication to send email
$mail->SMTPAuth = true;
//Provide username and password
$mail->Username = "xxxxxx";
$mail->Password = "xxxx";
//If SMTP requires TLS encryption then set it
$mail->SMTPSecure = "ssl";
//Set TCP port to connect to
$mail->Port = 25; //587 //80
$mail->From ="xxxxxx"; //from mailer
$mail->FromName = "test sender"; //mailer name
$mail->addAddress("xxxxxx", "Recepient Name");
$mail->isHTML(true);
$mail->Subject = "Subject Text";
$mail->Body = "<i>Mail body in HTML</i>";
$mail->AltBody = "This is the plain text version of the email content";
if($mail->send()){
echo "sent";
}
else{
echo "sorry";
}
?>