PHPMailer, SMTP connect() failed Fehler mit Gmail

Ich versuche, mich ein Kontakt-Formular und ich bin mit PHPMailer. Ich habe versucht, auf localhost mit xampp und es funktioniert perfekt. Aber wenn ich upload auf meine host bekomme ich die Fehlermeldung SMTP connect() failed.

Hier ist mein code:

$m = new PHPMailer;

$m->isSMTP();
$m->SMTPAuth = true;

$m->Host = "smtp.gmail.com";
$m->Username = "[email protected]";
$m->Password = "mypass";
$m->SMTPSecure = "ssl";
$m->Port = "465";

$m->isHTML();

$m->Subject = "Hello world";
$m->Body = "Some content";

$m->FromName = "Contact";

$m->addAddress('[email protected]', 'Test');

Ich habe versucht, ändern Sie den port auf 587 und den SMTPsecure tls (und alle Kombinationen). Funktioniert aber nicht. Irgendwelche Tipps um dieses Problem zu lösen?

Dank

mögliche Duplikate von PHPMailer nicht E-Mail senden

InformationsquelleAutor Devilquest | 2014-09-19

Schreibe einen Kommentar