Versión de Prestashop: 1.5.0.17 (aunque seguramente será válido para otras versiones)
Hoy después de varias horas intentando averiguar por qué no podía enviar emails a través de la última tienda Prestashop que configuré, por fin di con la solución. El problema era que a pesar de tener la configuración correcta (servidor SMTP externo con todos sus datos bien puestos), al enviar el correo de prueba la tienda me devolvía el odioso mensaje en rojo:
Error: please check your configuration
There was a problem reading line 1 of an SMTP response. The response so far was:
[]. It appears the connection has died without saying goodbye to us! Too many emails in one go perhaps? (fsockopen: #0)
Finalmente, la clave estaba en la parte «the connection has died without saying goodbye to us«, lo que podía significar que, o bien el servidor de correo estaba mal configurado (descartado), o bien el tiempo que Prestashop estaba esperando por una respuesta era insuficiente. Después de dar muchas vueltas por el backend buscando este posible valor de configuración y no encontrarlo (qué raro que no sea un valor configurable), decidí mirar el código. Encontré el problema en las líneas 170 y 274 del fichero /classes/Mail.php, que efectivamente tenían valores que estaba claro que eran insuficientes:
Línea 170 :
$connection->setTimeout(4);
Línea 274 :
$smtp->setTimeout(5);
Cambié los respectivos valores por 5 y 10, y por fin pude ver el mensaje en verde que me indicaba que mis correos se estaban enviando.
Brillante !!!
Cambiaron las líneas de referencia por la versión pero están muy cerca y se pueden buscar con 10 y 20 funciona perfecto.
Muchas gracias
Ottimo!
l’unico che funziona tra le soluzioni trovate!