lleonardis
(Leonardis, Leonel Eduardo)
10 Agosto, 2022 17:49
4
Hola Sergio, agrego a lo de Jessica!!!
Veo que están usando smtp.office365.com :
2022-08-10 10:55:50 Connection failed. Error #2: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution [/guarani/vendor/phpmailer/phpmailer/src/SMTP.php line 344]
2022-08-10 10:55:50 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com :*** (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) [/guarani/vendor/phpmailer/phpmailer/src/SMTP.php line 344]
Encontré los siguientes posts que pueden ayudar:
abierto 09:28AM - 06 Jun 17 UTC
cerrado 10:27AM - 06 Jun 17 UTC
Hi. I am reveiving such an error when ı try to send mail.
> 2017-06-06 08:49… :32 Connection: opening to smtp.office365.com:587, timeout=300, options=array ( ) 2017-06-06 08:49:49 Connection failed. Error #2: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known [/var/www/test/lib/mailer/class.smtp.php line 294] 2017-06-06 08:49:49 Connection failed. Error #2: stream_socket_client(): unable to connect to smtp.office365.com:587 (php_network_getaddresses: getaddrinfo failed: Name or service not known) [/var/www/test/lib/mailer/class.smtp.php line 294] 2017-06-06 08:49:49 SMTP ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0) 2017-06-06 08:49:49 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
`` $mail = new PHPMailer;
$mail->SMTPDebug = 4; // Enable verbose debug output
$mail->isSMTP();
$mail->SMTPSecure = 'tls'; // Set mailer to use SMTP
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Host = 'smtp.office365.com'; // Specify main and backup SMTP servers
$mail->Username = 'test@test.com'; // SMTP username
$mail->Password = 'test123'; // SMTP password
$mail->Port = 587;
$mail->SetLanguage("tr", "phpmailer/language");
$mail->CharSet ="utf-8";
$mail->Encoding="base64";
$mail->setFrom('test@test.com', 'test test');
$mail->addAddress("test@test.com","testt"); // Add a recipient
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = " test test test test...";
$mail->Body = $testresult;
if(!$mail->send()) {
echo "<div class='alert alert-warning' role='alert'>".$mail->ErrorInfo."</div>";
}
https://answers.microsoft.com/en-us/msoffice/forum/all/smtp-error-failed-to-connect-to-server/524ebb40-5fd9-4820-91da-07c504506e24
¿en Preinscripción tenes las misma configuración que en Gestión?
En el perfil admin de Preinscripción podes probar el envío de email en la operación Pruebas => Probar correo .
saludos
2