The error "Cannotconnencttorelayhost" is returned when smtp is used by php to send an email.

Source: Internet
Author: User
The error "Cannotconnencttorelayhost" is returned when php uses smtp to send emails. DEDEcms is used to customize a php file for sending emails and dedecms built-in mail is used. class. php, can be normally sent in the local, uploaded to the server, the prompt Cannot connenct to relay host smtp.qq.com Error: () Error: Cannot send email to XXX@qq.com online to find a lot of articles, finally, the problem lies in the environment configuration of the server.

Find php. ini: check two places. one is allow_url_fopen, which must be set to on; the other is disable_functions. if fsock and fsockopen appear next to them, remove these two functions, restart apache and then you can send emails normally.

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.