Swiftmailer connection exception - smtp connection failed (ssl)
ive been looking online for hours for solution in this problem of mine.
I just simply would like to send emails using gmail smtp, php, and swiftmailer
I am using kohana for this. Xampp 1.7.4. At first, it displays an error about ssl not being configured in php. I googled and added a new line in php.ini, that is (extension = php_openssl.dll), and pasted two dll files from php folder to apache bin folder (libeay32.dll and ssleay32.dll). but to no avail, it still wont allow me to send emails..
Here's the error being displayed, i cant find similar problems online... anyone pls. help.
Swift_ConnectionException
C:/xampp/htdocs/gbs/system/vendor/swift/Swift/Connection/SMTP.php [309]:
The SMTP connection failed to start [ssl://smtp.gmail.com:465]: fsockopen ret开发者_开发问答urned Error Number 0 and Error String ''
Stack Trace
* system\vendor\swift\Swift.php [216]:
Swift_Connection_SMTP->start( )
* system\vendor\swift\Swift.php [101]:
Swift->connect( )
* system\helpers\email.php [103]:
This is just a wild guess based on a similar problem I had, so I could be that it has nothing to do with it.
What I'm thinking is that somewhere you have to give the path to the root certificat authority file.
On my computer it is located in /etc/ssl/certs/ca-certificates.crt
, but you will have to find out where it is on your computer/server. Now the problem is finding out how you can pass that on through swiftmailer.
Another thing the make sure is in the swiftmailer documentation:
For SSL or TLS encryption to work your PHP installation must have appropriate OpenSSL transports wrappers. You can check if "tls" and/or "ssl" are present in your PHP installation by using the PHP function stream_get_transports()
精彩评论