fsockopen() [function.fsockopen]: unable to connect to tls://smtp.gmail.com:465 (Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?)
Swift with gmail
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
Swift with gmail
Im trying out this handy dandy switft stuff but I can't get it to work with gmail. it says that i need to enable somthing in my php.ini file but i have no idea what. here is the error I get:
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
ok now when i try to connect it just times out after like 15 seconds. it's like this:
my loading of swift:
the error:
Code: Select all
//this works
$thing = file_get_contents('http://www.google.com');
dump($thing);
//this times out
$mailer = $this->LoadExtension('Swift', array('ConnectionType' => 'gMail'));Code: Select all
require('./Extensions/Swift/Swift.php');
require('./Extensions/Swift/Swift/Swift_SMTP_Connection.php');
$swift = new Swift(new Swift_SMTP_Connection('smtp.gmail.com', SWIFT_SECURE_PORT, SWIFT_TLS));fsockopen() [function.fsockopen]: unable to connect to tls://smtp.gmail.com:465 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Says TLS is a registered stream... hmm.. Not too sure on this
I've had one other developer contact me having difficulty getting TLS to work on windows and he said something about needing the static binaries for OpenSSL for it to work but I'm not 100% on that. The odd thing is that the error you're getting seems to suggest it's Gmail that's not responding but I doubt that.
Not sure it makes much difference but Gmail is using the Thawte Root Ca certificate... perhaps OpenSSL for windows does not include that cert so you may need to include it yourself.
Not sure it makes much difference but Gmail is using the Thawte Root Ca certificate... perhaps OpenSSL for windows does not include that cert so you may need to include it yourself.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia