SMTP connect () failed.


I am trying to send an email using PHPMailer configured with the data of my corporate mail server and which I get the following error:

SMTP connect () failed.

I am trying to do it from a PC with windows server 2008 r2, I have tried the code on a PC with windows 10 and it runs well.

the code is:

$mail = new PHPMailer();
//Server settings
$mail->SMTPDebug = 2;                                 
$mail->Host = '';  
$mail->SMTPAuth = true;                               
$mail->Username = '[email protected]';                 
$mail->Password = 'password';                           
$mail->SMTPSecure = 'tls';                            
$mail->Port = 587;                                    

$mail->setFrom('[email protected]', 'empresa name');
$mail->addAddress('[email protected]', 'destino name');     

$mail->Subject = 'Reporte Compras Diarias';
$mail->Body    = $tabla_columnas;

asked by joseyanez91 29.12.2018 в 17:36

0 answers