Simon Mundy wrote:
>
> 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)
>
>
i tried each with config
'ssl' => 'tls',
'port' => 587
with STREAM_CRYPTO_METHOD_SSLv2_CLIENT the error is reduced to:
"Fatal error: Exception thrown without a stack frame in Unknown on line 0"
all others TLS, v23, v3 make no difference.
error:
Warning: fgets() [function.fgets]: SSL operation failed with code 1. OpenSSL
Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version
number in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 303
Fatal error: Exception thrown without a stack frame in Unknown on line 0
Simon Mundy wrote:
>
> 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.
>
stream_set_blocking ($this->_socket, true); doesn't seem to make a
difference, though i'm not quite shure where to place the block / unblock.
mike
--
View this message in context:
http://www.nabble.com/Zend_Mail---how-to-use-Zend_Mail_Transport_Smtp-for-googlemail.com-tf4097373s16154.html#a11666924
Sent from the Zend Framework mailing list archive at Nabble.com.