CakePHP SwiftMailer SMTP TLS OpenSSL错误SSL3_GET_RECORD:版本号错误 [英] CakePHP SwiftMailer SMTP TLS OpenSSL Error SSL3_GET_RECORD:wrong version number

查看:143
本文介绍了CakePHP SwiftMailer SMTP TLS OpenSSL错误SSL3_GET_RECORD:版本号错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用在这里找到的CakePHP SwiftMailer组件发送电子邮件: http ://bakery.cakephp.org/articles/sky_l3ppard/2009/11/07/updated-swiftmailer-4-xx-component-with-attachments-and-plugins

I'm attempting to send an email using the CakePHP SwiftMailer component I found here: http://bakery.cakephp.org/articles/sky_l3ppard/2009/11/07/updated-swiftmailer-4-xx-component-with-attachments-and-plugins

我要发送到的服务器在端口25上使用带有TLS的SMTP.这是我尝试发送邮件时遇到的错误:

The server I'm sending to is using SMTP with TLS over port 25. Here's the error I get when I attempt to send a mail:

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信息:

Here's the OpenSSL info from my phpinfo:

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的更多信息:

And some more info from my phpinfo:

PHP Version 5.3.5-1ubuntu7.2
Registered Stream Socket Transports     tcp, udp, unix, udg, ssl, sslv3, sslv2, tls 

非常感谢您的帮助:-)

Any help here is greatly appreciated :-)

SSL操作失败,代码为1.OpenSSL错误消息: 错误:1408F10B:SSL例程:SSL3_GET_RECORD:版本号错误

SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

这似乎是问题的根源.有人知道这到底是什么意思吗?

This seems to be the root of the problem. Anyone know what exactly this means?

推荐答案

我们已经解决了此问题.问题似乎出在我们的SSL版本和SwiftMailer的connect方法上. SwiftMailer组件尝试使用TLS进行连接,而相反,它首先需要以纯文本格式进行连接,然后启动TLS连接.希望这对其他人有帮助.

We have resolved this issue. The problem appeared to be with our SSL version and the connect method of SwiftMailer. The SwiftMailer component was attempting to connect using TLS, when instead it first needed to connect in plaintext, and then initiate the TLS connection. Hope this helps anyone else with this problem.

这篇关于CakePHP SwiftMailer SMTP TLS OpenSSL错误SSL3_GET_RECORD:版本号错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆