Hi, I have configured my ubuntu server to send via gmail smtp ssl port, but every time I have tried with Could not open socket fail.
if my smtp setup as TLS then:
failed: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I have tested on my ubuntu with command:
openssl s_client -connect smtp.gmail.com:465 -crlf -ign_eof
so it should works.
I have also disable firewall with command: sudo ufw disable
I think that is maybe xampp has php installed in /opt/lamp/bin and ubuntu itself has also installed a php version. I also add path to /etc/profile with: export PATH=$PATH:/opt/lampp:
my xampp is xampp-linux-x64-5.6.8-0-installer.run
/opt/lampp/bin/php -v
PHP 5.6.8 (cli) (built: Apr 20 2015 18:37:47)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
Still unlucky, is it because xenforo use php in system wide?
my error logs is:
Zend_Mail_Protocol_Exception: Email to xxxyyy@zzzmail.com failed: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
Generated By: xxxyyy, A moment ago
Stack Trace
#0 /opt/lampp/htdocs/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://smtp.gmai...')
#1 /opt/lampp/htdocs/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /opt/lampp/htdocs/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /opt/lampp/htdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /opt/lampp/htdocs/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /opt/lampp/htdocs/library/XenForo/Mail.php(152): XenForo_Mail->sendMail(Object(Zend_Mail))
#6 /opt/lampp/htdocs/library/XenForo/Model/UserConfirmation.php(153): XenForo_Mail->send('johnvuong1999@h...', 'johnvuong1999')
#7 /opt/lampp/htdocs/library/XenForo/ControllerPublic/AccountConfirmation.php(108): XenForo_Model_UserConfirmation->sendEmailConfirmation(Array)
#8 /opt/lampp/htdocs/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_AccountConfirmation->actionResend()
#9 /opt/lampp/htdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /opt/lampp/htdocs/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(63) "http://forum.aaaaa.com/index.php?account-confirmation/resend"
["_GET"] => array(1) {
["account-confirmation/resend"] => string(0) ""
}
["_POST"] => array(5) {
["_xfToken"] => string(8) "********"
["_xfConfirm"] => string(1) "1"
["_xfRequestUri"] => string(27) "/index.php?account/two-step"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
if my smtp setup as TLS then:
failed: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I have tested on my ubuntu with command:
openssl s_client -connect smtp.gmail.com:465 -crlf -ign_eof
so it should works.
I have also disable firewall with command: sudo ufw disable
I think that is maybe xampp has php installed in /opt/lamp/bin and ubuntu itself has also installed a php version. I also add path to /etc/profile with: export PATH=$PATH:/opt/lampp:
my xampp is xampp-linux-x64-5.6.8-0-installer.run
/opt/lampp/bin/php -v
PHP 5.6.8 (cli) (built: Apr 20 2015 18:37:47)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
Still unlucky, is it because xenforo use php in system wide?
my error logs is:
Zend_Mail_Protocol_Exception: Email to xxxyyy@zzzmail.com failed: Could not open socket - library/Zend/Mail/Protocol/Abstract.php:277
Generated By: xxxyyy, A moment ago
Stack Trace
#0 /opt/lampp/htdocs/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('ssl://smtp.gmai...')
#1 /opt/lampp/htdocs/library/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /opt/lampp/htdocs/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /opt/lampp/htdocs/library/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /opt/lampp/htdocs/library/XenForo/Mail.php(175): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /opt/lampp/htdocs/library/XenForo/Mail.php(152): XenForo_Mail->sendMail(Object(Zend_Mail))
#6 /opt/lampp/htdocs/library/XenForo/Model/UserConfirmation.php(153): XenForo_Mail->send('johnvuong1999@h...', 'johnvuong1999')
#7 /opt/lampp/htdocs/library/XenForo/ControllerPublic/AccountConfirmation.php(108): XenForo_Model_UserConfirmation->sendEmailConfirmation(Array)
#8 /opt/lampp/htdocs/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_AccountConfirmation->actionResend()
#9 /opt/lampp/htdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /opt/lampp/htdocs/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
["url"] => string(63) "http://forum.aaaaa.com/index.php?account-confirmation/resend"
["_GET"] => array(1) {
["account-confirmation/resend"] => string(0) ""
}
["_POST"] => array(5) {
["_xfToken"] => string(8) "********"
["_xfConfirm"] => string(1) "1"
["_xfRequestUri"] => string(27) "/index.php?account/two-step"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Last edited: