smtp error in php code

Asked

Viewed 34 times

1

I have the following problem,

here is the configuration file:

define('MAIL_HOST','xxxxx');         
define('MAIL_USER','xxxxx');                
define('MAIL_PASS','xxxxx');            
define('MAIL_FROM','xxxxx');    
define('MAIL_NAME','xxxxx'); 

here is the file that makes the e-mail call:

$mail = new PHPMailer();
$mail->SetLanguage("br", "smtp/"); //Idioma
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->Host     =   MAIL_HOST;          
$mail->Username =   MAIL_USER;          
$mail->Password =   MAIL_PASS;          
$mail->From     =   MAIL_FROM;          
$mail->FromName =   MAIL_NAME; 

and here’s the mistake that happens when I tell you to proceed:

SMTP -> FROM SERVER:220-servidor.universeservidor.com.br ESMTP Exim 4.91 
          #1 Sat, 02 Mar 2019 21:14:43-0300 220-We do not 
              authorize the use of this system to transport unsolicited, 
              220 and/or bulk e-mail.
SMTP -> FROM SERVER: 250-servidor.universeservidor.com.br Hello localhost[177.12.86.71] 
          250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-STARTTLS 250 HELP
SMTP -> ERROR: AUTH not accepted from server: 503 AUTH command used when not advertised
SMTP -> FROM SERVER:250 Reset OK
SMTP Error: Could not authenticate. A mensagem nao pode ser enviada.

Erro do envio: SMTP Error: Could not authenticate.

Error image

  • I think only the server port is missing there dude. You have to also check the email service accepts connection without being ssl

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.