ďťż

Ładny brzuch

Witam. Używam klasy phpMailer do wysyłania maila z skrzynki na gmail.com. Podczas próby wysłania dostaję taki komunikat:

SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "220 mx.google.com ESMTP f4sm6481410nfh " SMTP -> get_lines(): $data is "220 mx.google.com ESMTP f4sm6481410nfh " SMTP -> FROM SERVER: 220 mx.google.com ESMTP f4sm6481410nfh SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250-mx.google.com at your service, [213.251.189.16] " SMTP -> get_lines(): $data is "250-mx.google.com at your service, [213.251.189.16] " SMTP -> get_lines(): $data was "250-mx.google.com at your service, [213.251.189.16] " SMTP -> get_lines(): $str is "250-SIZE 28311552 " SMTP -> get_lines(): $data is "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 " SMTP -> get_lines(): $data was "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 " SMTP -> get_lines(): $str is "250-8BITMIME " SMTP -> get_lines(): $data is "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME " SMTP -> get_lines(): $data was "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME " SMTP -> get_lines(): $str is "250-STARTTLS " SMTP -> get_lines(): $data is "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME 250-STARTTLS " SMTP -> get_lines(): $data was "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME 250-STARTTLS " SMTP -> get_lines(): $str is "250 ENHANCEDSTATUSCODES " SMTP -> get_lines(): $data is "250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME 250-STARTTLS 250 ENHANCEDSTATUSCODES " SMTP -> FROM SERVER: 250-mx.google.com at your service, [213.251.189.16] 250-SIZE 28311552 250-8BITMIME 250-STARTTLS 250 ENHANCEDSTATUSCODES SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh " SMTP -> get_lines(): $data is "530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh " SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 2.1.0 Flushed f4sm6481410nfh " SMTP -> get_lines(): $data is "250 2.1.0 Flushed f4sm6481410nfh " SMTP -> FROM SERVER: 250 2.1.0 Flushed f4sm6481410nfh SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh " SMTP -> get_lines(): $data is "530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh " SMTP -> FROM SERVER: 530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh SMTP -> ERROR: MAIL not accepted from server: 530 5.7.0 Must issue a STARTTLS command first f4sm6481410nfh SMTP -> get_lines(): $data was "" SMTP -> get_lines(): $str is "250 2.1.0 Flushed f4sm6481410nfh " SMTP -> get_lines(): $data is "250 2.1.0 Flushed f4sm6481410nfh " SMTP -> FROM SERVER: 250 2.1.0 Flushed f4sm6481410nfh There has been a mail error The following From address failed: hckd16@gmail.com
Mój plik konfiguracyjny wygląda mniej więcej tak:
require("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->PluginDir = "phpmailer/"; $mail->From = "hckd16@gmail.com"; //adres naszego konta $mail->FromName = "phpMailer tester";//nagłówek From $mail->Host = "smtp.gmail.com";//adres serwera SMTP $mail->Mailer = "smtp"; $mail->Username = "hckd16";//nazwa użytkownika $mail->Password = "xxx";//nasze hasło do konta SMTP $mail->SMTPAuth = true; $mail->SetLanguage("en", "phpmailer/language/"); $mail->Subject = "Mail testowy";//temat maila // w zmienną $text_body wpisujemy treść maila $text_body = "Cześć, chyba phpMailer działa \n\n"; $text_body .= "Na zawsze Twój, \n"; $text_body .= "PHPMailer"; $mail->Body = $text_body; // adresatów dodajemy poprzez metode 'AddAddress' $mail->AddAddress("hckd16@o2.pl","Test"); //$mail->AddAddress("franek@gdziestam.pl","Franek"); if(!$mail->Send()) echo "There has been a mail error <br>"; echo $mail->ErrorInfo."<br>"; // Clear all addresses and attachments $mail->ClearAddresses(); $mail->ClearAttachments(); echo "mail sent <br>";
Z tego co widać to wypluwa, że pass jest nie poprawny, ale jest on na 100% dobry bo na stronie loguje się na te hasło. W czym tkwi problem ? Z góry thx.

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •