Ffsystem
The web site was developed for testing on the Windows platform and was completed after synchronizing to CentOS6.5 Nigix run. The Phpmailer component was found to be unable to make a connection to the SMTP server, causing the message to be sent.
Error code:
Phpmailer SMTP connect () failed
To find some solutions on the Internet, the following scenarios are measured:
1. Cause analysis, Phpmailer in the SMTP server DNS resolution, the IP V6 address is obtained, and then the IP V6 resolves to the address to connect, resulting in a connection failure.
2. There are three options: 1. Skip DNS resolution and give the IP address directly. 2. IPV4 DNS resolution is enforced. 3. Disable IPV6.
3. Because IPV6 is not available, I use the option to disable IPV6.
Steps:
1. Detection IPv6
IP-6
If there is a display, the IPV6 protocol is enabled
2. Turn off IPV6 with VI at end of/etc/modprobe.d/dist.conf add
Alias net-pf- offalias ipv6 off
Unless noted, Ffsystem articles are original, reproduced please link to the form of this article address
This address: http://www.cnblogs.com/ffsystem/p/3963198.html
Phpmailer solution for unable to send mail under CentOS 6.5