我試圖使用CakePHP的SwiftMailer成分,我發現這裏發送電子郵件: http://bakery.cakephp.org/articles/sky_l3ppard/2009/11/07/updated-swiftmailer-4-xx-component-with-attachments-and-pluginsCakePHP的SwiftMailer SMTP TLS OpenSSL的錯誤SSL3_GET_RECORD:錯誤的版本號
我發送給被過度使用SMTP與TLS服務器端口25。這裏是我的錯誤,當我嘗試發送郵件:
Notice (8): Trying to get property of non-object [APP/views/helpers/hdl_session.php, line 14]
Warning (2): stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number [CORE/vendors/classes/Swift/Transport/StreamBuffer.php, line 271]
Warning (2): stream_socket_client() [function.stream-socket-client]: Failed to enable crypto [CORE/vendors/classes/Swift/Transport/StreamBuffer.php, line 271]
Warning (2): stream_socket_client() [function.stream-socket-client]: unable to connect to tls://mail.aedisit.com:25 (Unknown error) [CORE/vendors/classes/Swift/Transport/StreamBuffer.php, line 271]
Warning (2): Illegal offset type in isset or empty [CORE/cake/libs/i18n.php, line 177]
Warning (2): Cannot modify header information - headers already sent by (output started at /srv/www/stage/hypercool/cake/libs/debugger.php:673) [CORE/cake/libs/controller/controller.php, line 742]
下面是從我的phpinfo OpenSSL的信息:
openssl
OpenSSL support enabled
OpenSSL Library Version OpenSSL 0.9.8o 01 Jun 2010
OpenSSL Header Version OpenSSL 0.9.8o 01 Jun 2010
從我的phpinfo一些更多的信息:
PHP Version 5.3.5-1ubuntu7.2
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
這裏任何幫助是極大的讚賞:-)
編輯:
SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
這似乎是問題的根源。任何人都知道這意味着什麼?