Es konnte keine Verbindung zum SMTP-host. Mailer Error: SMTP Fehler: Konnte keine Verbindung zum SMTP-host

Ich bin mit PHPMailer für das senden von E-mail mit Authentifizierung, aber ich bin immer folgende Meldung, wenn ich versucht, um mein sendmessage.php.

SMTP -> ERROR: Failed to connect to server: Connection timed out (110) 
SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

kann jemand bitte sagen Sie mir, warum bin ich immer diese Meldung...und einige Lösung für dieses

Mycode ist wie unten angegeben

sendmessage.php

<html>
<head>
<title>PHPMailer - SMTP (Gmail) basic test</title>
</head>
<body>

<?php

//error_reporting(E_ALL);
error_reporting(E_STRICT);

date_default_timezone_set('America/Toronto');

require_once('../class.phpmailer.php');
//include("class.smtp.php"); //optional, gets called from within class.phpmailer.php if not already loaded


$mail = new PHPMailer(); //create a new object
$mail->IsSMTP(); //enable SMTP
$mail->SMTPDebug = 1; //debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; //authentication enabled
$mail->SMTPSecure = 'ssl'; //secure transfer enabled REQUIRED for GMail
$mail->Host = "smtp.gmail.com";
$mail->Port = 465; //or 587
$mail->IsHTML(true);
$mail->Username = "[email protected]";
$mail->Password = "myemailpassword";
$mail->SetFrom('[email protected]','vgvb');
$mail->Subject = "Test";
$mail->Body = "hello";
$mail->AddAddress('myfriendemailid');
 if(!$mail->Send())
    {
    echo "Mailer Error: " . $mail->ErrorInfo;
    }
    else
    {
    echo "Message has been sent";
    }
?>

</body>
</html>
  • Hat dein host aktiviert Ihre server kommunizieren auf port 465? Einige hosts können Sie nicht senden Sie E-mail von Ihnen.
  • müssen wir tun, dass standardmäßig..........wie um zu überprüfen, dass
  • Sie haben, um Anruf oder Ihre E-Mail-hosting-provider.
  • um zu überprüfen, ob Sie berechtigt sind, die Kommunikation über diesen port =============================================== 'öffnen Sie cmd' 'geben Sie telnet smtp.gmail.com 465', wenn Sie die server-Antwort dann darfst du communictae
  • um zu überprüfen, ob Sie berechtigt sind, die Kommunikation über diesen port open cmd type telnet smtp.gmail.com 465 wenn Sie bekommen Antwort vom server dann darfst du communictae
InformationsquelleAutor user3159579 | 2014-01-09
Schreibe einen Kommentar