Simon Mundy wrote:
> 
> Did you try TLS on port 25?
> 
> Since you're getting the error from the SSL stream itself it sounds  
> like it can't negotiate properly. Just to help solve the problem,  
> which version of ZF are you using and which version of PHP? I saw from  
> your later post that SSL is correctly compiled into your copy of PHP.
> 
> 

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:


===============================================

$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);

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

mail gets sent!

=======================================================

'ssl'           => 'tls',
'port'          => 465

nothing happens. script times out. 
no error
email is not sent 

==============================================

'ssl'           => 'ssl',
'port'          => 465    

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 

mail gets sent!

=============================================

'ssl'           => 'ssl',
'port'          => 587 

error:
Warning: stream_socket_client() [function.stream-socket-client]: SSL
operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221

Warning: stream_socket_client() [function.stream-socket-client]: Failed to
enable crypto in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221

Warning: stream_socket_client() [function.stream-socket-client]: unable to
connect to ssl://smtp.googlemail.com:587 (Unknown error) in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221

EXCEPTION:  Could not open socket

email is not sent 

=================================================

'ssl'           => 'tls',
'port'          => 25  

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

mail gets sent!

==================================================

'ssl'           => 'ssl',
'port'          => 25  

error:
Warning: stream_socket_client() [function.stream-socket-client]: SSL
operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221

Warning: stream_socket_client() [function.stream-socket-client]: Failed to
enable crypto in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221

Warning: stream_socket_client() [function.stream-socket-client]: unable to
connect to ssl://smtp.googlemail.com:25 (Unknown error) in
D:\adat\awebsites\ev-manager\mvc-site\lib\Zend\Mail\Protocol\Abstract.php on
line 221


EXCEPTION: Could not open socket

email is not sent

================================================

 

-- 
View this message in context: 
http://www.nabble.com/Zend_Mail---how-to-use-Zend_Mail_Transport_Smtp-for-googlemail.com-tf4097373s16154.html#a11665935
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to