Hi list,
there is a WARNING not catched by Zend_Mail_Protocol_Abstract:
> Warning: stream_socket_client(): unable to connect to tcp://1.2.3.4:25
> (Connection refused) in /usr/share/php/Zend/Mail/Protocol/Abstract.php
> on line 224
Attached to this mail there is one possible way to fix this. This is
annoying if you are (like me) using Zend_Mail_Protocol_Smtp to test
whether a certain SMTP server is responding or not.
Kind regards,
Thomas
NB: Please let me know if instead of posting to this list directly
opening an issue would have been the better / preferred option.
diff -urN Zend-1.5.1/Mail/Protocol/Abstract.php Zend-1.5.1_patched/Mail/Protocol/Abstract.php
--- Zend-1.5.1/Mail/Protocol/Abstract.php 2008-05-07 13:48:02.000000000 +0200
+++ Zend-1.5.1_patched/Mail/Protocol/Abstract.php 2008-05-07 13:46:16.000000000 +0200
@@ -221,7 +221,7 @@
$errorStr = '';
// open connection
- $this->_socket = stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);
+ $this->_socket = @stream_socket_client($remote, $errorNum, $errorStr, self::TIMEOUT_CONNECTION);
if ($this->_socket === false) {
if ($errorNum == 0) {