PHPMailer nie działa z smtp.gmail.com

Bug #950158 reported by Seba Gałowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vallheru
Fix Released
High
Bartek Jasicki

Bug Description

Błąd:
---
Wiadomość nie została wysłana. Błąd:
Błąd SMTP: Nie można przeprowadzić autentykacji.

Konfiguracja:
---
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail -> PluginDir = "./mailer/";
$mail -> SetLanguage("pl", "./mailer/language/");
$mail -> CharSet = "utf-8";
$mail -> Sender = $gamemail;
$mail -> IsSMTP();
$mail -> Host = "smtp.gmail.com";
$mail -> SMTPAuth = true;
$mail -> Username = "<email address hidden>";
$mail -> Password = "haslo";
$mail -> From = $gamemail;
$mail -> FromName = $gamename;
$mail -> AddAddress($adress);
$mail -> WordWrap = 50;
$mail -> Subject = $subject;
$mail -> Body = $message;
?>

Revision history for this message
Bartek Jasicki (thindil) wrote :

Najprostsze obejście tego problemu to dodać dwie linie do pliku konfiguracyjnego PHPMailera. Powinno pomóc. Poprawka jest już dodana do repozytorium

$mail -> SMTPSecure = true;
$mail -> Port = 465;

Changed in vallheru:
importance: Undecided → High
status: New → Fix Committed
milestone: none → 1.5
Revision history for this message
Seba Gałowski (b379668) wrote :

Teraz mailerconfig.php jest generowane puste.

Revision history for this message
Seba Gałowski (b379668) wrote :

A nie, jednak generuje, popieprzyłem chmody xD

Revision history for this message
Seba Gałowski (b379668) wrote :

Wiadomość przy próbie rejestracji:
---
Wiadomość nie została wysłana. Błąd:
Language string failed to load: tls
---
spróbuję z ssl

Revision history for this message
Bartek Jasicki (thindil) wrote :

Może czegoś brakuje w PHP albo w PHPMailer?

Changed in vallheru:
assignee: nobody → Bartek Jasicki (thindil)
Revision history for this message
Seba Gałowski (b379668) wrote :

Myślę że to kwestia tego że gmail wymaga nazwy użytkownika wraz z @gmail.com. Postawiłem ponownie skrypt, tym razem używając maila na wp.pl jako serwera smtp i działa jak należy.

Bartek Jasicki (thindil)
Changed in vallheru:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.