OK, I'm running PHP 5.1.6 (Fedora) and I tried this:-
$config = array(
'auth' => 'login',
'username' => '[EMAIL PROTECTED]',
'password' => 'secret',
'ssl' => 'tls',
'port' => 587
);
$tr = new Zend_Mail_Transport_Smtp('smtp.googlemail.com',$config);
Zend_Mail::setDefaultTransport($tr);
...etc...
and it performed correctly (i.e. no error messages).
Could you please var_dump the results of 'stream_get_transports()'? It
looks like TLS is being initiated but not correctly negotiated on your
box and I can't work out why. The line in SMTP that sets this up is:-
stream_socket_enable_crypto($this->_socket, true,
STREAM_CRYPTO_METHOD_TLS_CLIENT)
So my guess is that this is failing somehow but it's still allowing a
fallback of non-secure mail...?!?
Is there any chance of modifying your local copy and trying any of the
following:-
stream_socket_enable_crypto($this->_socket, true,
STREAM_CRYPTO_METHOD_TLS_CLIENT)
stream_socket_enable_crypto($this->_socket, true,
STREAM_CRYPTO_METHOD_SSLv23_CLIENT)
stream_socket_enable_crypto($this->_socket, true,
STREAM_CRYPTO_METHOD_SSLv2_CLIENT)
stream_socket_enable_crypto($this->_socket, true,
STREAM_CRYPTO_METHOD_SSLv3_CLIENT)
There is also the question of the socket not performing due to
blocking mode. You could also try:-
stream_set_blocking ($this->_socket, true);
stream_socket_enable_crypto ($this->_socket, true,
STREAM_CRYPTO_METHOD_TLS_CLIENT);
stream_set_blocking ($this->_socket, false);
Let me know how you get on with it - this is the first instance I've
had of SSL not performing correctly so I'd really like to narrow down
the cause.
Cheers
yes i tried port 25. see below.
ZF version is 1.0
php version is 5.1.6 (xampp windows)
@ tfk: didn't find any "sslv2" or "sslv3" in zend mail.
found out, with some configs the mail gets actually sent, despite
the error.
has anybody a working example of Zend_Mail_Transport_Smtp connecting
to
smtp.googlemail.com?
here are some configs i tried:
--
Simon Mundy | Director | PEPTOLAB
""" " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
4124
http://www.peptolab.com