Using Phpmailer to send messages uses an unencrypted SMTP server, and the SMTP server used this time is connected using SSL (secure Sockets Layer, Secure Sockets Layer).
Fortunately, Phpmailer support SSL SMTP server, online data, thought that the lower mouth, plus smtpsecure settings on it, but the fact is not so.
The port in the code is changed to 465, plus $mail->smtpsecure = "SSL"; setting, the result Phpmailer has been prompted not to connect to the host.
Online all kinds of information, all kinds of consultation, after a variety of toss finally found the reason, PHP did not open OpenSSL expansion, Khan ...
windows open OpenSSL Extension
Found in php.ini file, Extension=php_openssl.dll, remove the "semicolon" from the front, and restart Apache.
Linux opens OpenSSL extension
CD php-5.2.14/ext/openssl/
MV Config0.m4 CONFIG.M4
Phpize
./configure
Make
Make install
Modify the php.ini file and add it in the appropriate location
Extension=openssl.so
A USR2 signal was sent to the PHP-FPM master process, and the SSL extension was added successfully.