Phpmailer solution for unable to send mail under CentOS 6.5

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.