Ricevo l'errore SMTP con PHP Mailer e Outlook SMTP. Sono confuso qui perché funziona bene su localhost con numero di porta 25 ma non funziona su Hosting Server, ho provato tutte le porte con SSL & TLS.
ERRORE SMTP: Impossibile connettersi al server: Timeout della connessione (110) con PHPMailer e Outlook SMTP
Error : SMTP ERROR: Failed to connect to server: Connection timed out (110)
My Code:
<?php
include("PHPMailer.php");
error_reporting(E_ALL);
ini_set('display_errors', '1');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.live.com";
$mail->SMTPDebug = 2;
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Username = "[email protected]";
$mail->Password = "password";
$mail->Priority = 1;
$mail->CharSet = 'UTF-8';
$mail->ContentType = 'text/html; charset=utf-8\r\n';
$mail->From = "[email protected]";
$mail->FromName = $name;
$mail->AddAddress("[email protected]");
$mail->IsHTML(true);
$mail->Subject = "You got Message from Website";
$mail->Body = "testing";
if(!$mail->Send())
{
echo 'Mailer Error: ' . $mail->ErrorInfo;
}
else
{
echo 'success';
}
?>
favore mi aiuti a risolvere questo problema. Ho condiviso l'hosting Linux.
Hai già risolto il problema? –
@ JorgeB., Sì, l'ho fatto. –
Metti una risposta con la tua risoluzione. –