hernani33 / SMTP-ERROR-Password-command-failed-535-auth-failure

SERVER -> CLIENT: 535-auth failure. 535 A autenticacao falhou (#5.7.1) 2016-12-08 12:52:26 SMTP ERROR: Password command failed: 535-auth failure. 535 A autenticacao falhou (#5.7.1) 2016-12-08 12:52:26 SMTP Error: Could not authenticate.
0 stars 0 forks source link

SMTP-ERROR-Password-command-failed-535-auth-failure #1

Open hernani33 opened 7 years ago

hernani33 commented 7 years ago

SERVER -> CLIENT: 535-auth failure. 535 A autenticacao falhou (#5.7.1) 2016-12-08 12:52:26 SMTP ERROR: Password command failed: 535-auth failure. 535 A autenticacao falhou (#5.7.1) 2016-12-08 12:52:26 SMTP Error: Could not authenticate. can someone help me? thanks hernani i have this code--->

`<?php include("ligacao.php"); include("class.phpmailer.php"); include("class.smtp.php"); include("class.pop3.php"); require("PHPMailerAutoload.php");{ $data = date('d/m/Y H:i'); $sql_carrinho ="SELECT * FROM clientes WHERE id_cliente='.$id_cliente"; if ($sql_carrinho == '') { echo 'erro ao selecionar'; } else{ while($res_seleciona = mysqli_fetch_array($sql_carrinho)); {

$porta = $res_seleciona ['587']; $servidor = $res_seleciona ['smtp.sapo.pt']; $usuario_conta = $res_seleciona ['hernani@sapo.pt']; $senhaemail = $res_seleciona ['']; $emailSite = $res_seleciona ['hernani@sapo.pt']; $emailsiterecebe = $res_seleciona ['hernani@sapo.pt']; $telefone = $res_seleciona ['']; $meudominio = $res_seleciona ['www.coelhodesign.info']; $nomeEmpresa = utf8_decode($res_seleciona ['coelhodesign']);

$pop = new POP3(); $pop->Authorise('pop.sapo.pt', 110, 30, 'hernani@sapo.pt', '*****', 1);

$mail=new PHPMailer(); $mail->SMTPSecure = "tls"; $mail->SMTPDebug = 4; $mail->Priority = 1; $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->AuthType = ''; $mail->CharSet = "utf-8"; $mail->Port = "{$porta}"; $mail->Hostname = "{$servidor}"; $mail->Username = "{hernani@sapo.pt}"; $mail->Password = '{*****}'; $mail->From = "{$email}"; $mail->FromName = "hernani@sapo.pt"; $mail->SetFrom("hernani@sapo.pt", "{$nomeEmpresa}"); $mail->AddAddress("$email", "{$nomeEmpresa}");

$mail->Subject = utf8_decode("Solicitação pedido:"); $mail->IsHTML = (true); //$mail->CharSet ='iso-8859-1'; //header('Content-Type: text/html; charset=iso-8859-1'); $body="Pedido - {$nomeEmpresa} {$data}

id_cliente -> {$id_cliente} Nome_Login ->{$nome_login} Cod. -> {$id_artigo} - Quantidade -> {$quantidade} - {$descricao_artigo} preço_artigo -> {$preco_artigo} * {$quantidade} Sub_total: {$sub_total} Valor Total: {$total}; Numero de compra: $id_compra {$resultado} {$primeiro_nome} {$apelido} {$endereco} {$localidade} {$codigo_postal} {$email} ------------------------------------------------------------------- "; $address = "hernani@sapo.pt"; $mail->AddAddress($address, "nome");

} }

$mail->Body=$mail_body.$body;

if($mail->send()){ echo "";}

else{ echo 'Erro ao enviar o email '.$mail->ErrorInfo; } }

//session_unset(); //session_destroy();

?>`

hernani33 commented 7 years ago

if i use true in --> $mail=new PHPMailer(true); can someone help me?? thanks hernani

give me these error -->

Fatal error: Uncaught phpmailerException: SMTP Error: Could not authenticate. in /var/www/html/site/class.phpmailer.php:1650 Stack trace: #0 /var/www/html/site/class.phpmailer.php(1498): PHPMailer->smtpConnect(Array) #1 /var/www/html/site/class.phpmailer.php(1335): PHPMailer->smtpSend('Date: Thu, 8 De...', 'Pedido - \n08/12...') #2 /var/www/html/site/class.phpmailer.php(1213): PHPMailer->postSend() #3 /var/www/html/site/finalizar_compra_2.php(140): PHPMailer->send() #4 {main} thrown in /var/www/html/site/class.phpmailer.php on line 1650