PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 27, 2020 2:28 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Mon Mar 09, 2009 8:37 am 
Offline
DevNet Resident
User avatar

Joined: Sat Jan 07, 2006 6:52 am
Posts: 1675
Location: Lahti, Finland.


Top
 Profile  
 
PostPosted: Mon Mar 09, 2009 8:46 am 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
It seems to dislike the version of SSL being used. Perhaps the OpenSSL library your PHP installation is built against is out of date?

Basically I think your client connection uses SSL2 whereas the remote server is trying to use SSL23, or vice versa. It's certainly an incompatibility with the libraries on each end.

Perhaps this is something I can fix at a code level... I'll look into it. I have a feeling you can change the "ssl://" part of my code to "sslv2://". If that works I can find out what my most portable course of action is.


Top
 Profile  
 
PostPosted: Mon Mar 09, 2009 9:07 am 
Offline
DevNet Resident
User avatar

Joined: Sat Jan 07, 2006 6:52 am
Posts: 1675
Location: Lahti, Finland.


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 1:39 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 1:52 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 6:41 pm 
Offline
Breakbeat Nuttzer
User avatar

Joined: Wed Mar 24, 2004 8:57 am
Posts: 13098
Location: Melbourne, Australia
Yes, you've always needed to use port 465 with Swift Mailer. 587 is the one you use if Swift Mailer will switch the TLS once a non-encrypted connection has been established. Swift Mailer can't do this (yet).


Top
 Profile  
 
PostPosted: Fri Apr 03, 2009 6:52 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 23, 2003 3:10 am
Posts: 11470
Location: Toronto
Thanks for the clarification. Hopefully it will save someone as big of a headache as mine :)


Top
 Profile  
 
PostPosted: Mon Aug 24, 2009 2:36 am 
Offline
Forum Newbie

Joined: Mon Aug 24, 2009 2:33 am
Posts: 1


Top
 Profile  
 
PostPosted: Mon Dec 14, 2009 8:10 am 
Offline
Forum Newbie

Joined: Wed Dec 09, 2009 12:31 pm
Posts: 1
I had a similar problem with a TLS service that connected plainly and then wanted to talk encryption. I just couldn't get it to work but in the end came across a piece of code that worked for me.

The OpenSSL library used by PHP doesn't support TLS connections that want to upswitch mid-stream so you have to do it natively using a socket-based connection. I bumped into this piece of code and it solved my problem perfectly. Maybe this is something that SwiftMailer could leverage.

http://forum.powweb.com/showthread.php?t=73406


Top
 Profile  
 
PostPosted: Thu May 20, 2010 2:10 am 
Offline
Site Administrator
User avatar

Joined: Sun May 19, 2002 10:24 pm
Posts: 6887
I'm running into this too using TLS:

Syntax: [ Download ] [ Hide ]
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number


I can't use port 465. The server won't respond on that port.

_________________
Image


Top
 Profile  
 
PostPosted: Sat May 22, 2010 2:43 pm 
Offline
Forum Newbie

Joined: Fri Aug 22, 2008 12:42 pm
Posts: 3
I have the same problem as Benjamin; what would one recommend? The necessity to connect via TLS on port 587 is non-negotiable for me, is this just not possible using PHP?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group