Ben Gönder adlı Gmail aracılığıyla İçin Basit Script PHPMailer kullanıyorum ve ben bir "Bilinmeyen hata" Getting ediyorum (en azından benim için!):
SMTP Error: Could not authenticate. Error: SMTP Error: Could not authenticate.
SMTP server error: 5.7.1 Username and Password not accepted. Learn more at 535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 p38sm2467302ybk.16
Ben SSL / TLS bağlantıları için yapılandırma OpenSSL'de Oku Hakkında ettik, ve ben yaptım. Apache ve PHP (OpenSSL uzantısı PHP Koşu ve mod_ssl Apache 2.2.16 çalışan ile) doğru-yapılandırılır.
Bu PHP Script:
<?php
require_once ("PHPMailer\class.phpmailer.php");
$Correo = new PHPMailer();
$Correo->IsSMTP();
$Correo->SMTPAuth = true;
$Correo->SMTPSecure = "tls";
$Correo->Host = "smtp.gmail.com";
$Correo->Port = 587;
$Correo->UserName = "foo@gmail.com";
$Correo->Password = "gmailpassword";
$Correo->SetFrom('foo@gmail.com','De Yo');
$Correo->FromName = "From";
$Correo->AddAddress("bar@hotmail.com");
$Correo->Subject = "Prueba con PHPMailer";
$Correo->Body = "<H3>Bienvenido! Esto Funciona!</H3>";
$Correo->IsHTML (true);
if (!$Correo->Send())
{
echo "Error: $Correo->ErrorInfo";
}
else
{
echo "Message Sent!";
}
?>
The Username And Password Are Ok, And I Tried in Thunderbird, Without Any Problem. I've also Used SSL Authentication And Port 465, getting the same Error.
Herkes bana yardımcı olabilir?
Şimdiden teşekkürler!
PS: Benim İngilizce için üzgünüm. Ben bir "Yerli-Speaker" Değilim