How to fix SMTP email authentication error in PHP

When I was sending email using Gmail SMTP authentication details, I got the below error. 

Error: 
SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (67373824)
SMTP Error: Could not connect to SMTP host. SMTP Error: Could not connect to SMTP host.

Solution:
Check openssl module enabled or not in your PHP configuration. If openssl module doesn’t enable, enable openssl module in PHP configuration file.

Open php.ini file and search “php_openssl.dll” then you will see like this code - 
;extension=php_openssl.dll

So enable this by remove symbol " ; " before extension like -
extension=php_openssl.dll

and save file.After restart your http server by server httpd restart command. Don’t forget to restart your web server after enabled module, otherwise it doesn’t take any effect.

You have read this article PHP / Technology with the title How to fix SMTP email authentication error in PHP. You can bookmark this page URL https://72point8mhz.blogspot.com/2012/06/how-to-fix-smtp-email-authentication.html. Thanks!

No comment for "How to fix SMTP email authentication error in PHP"

Post a Comment