How to deal with php mail sending and server connection rejection

Source: Internet
Author: User
Php mail sending, the server rejects connection to php mail sending, the server rejects connection, the server is in the United States, SMTP is 163, port 25, the test on the local machine is perfect, put it on the server and the following error occurs: Warning: fsockopen () [function. fsockopen]: unabletoconn php mail sent, server rejected connection
Php mail sending, server connection rejected, server in the United States, SMTP is 163, port 25, the test on the local machine is perfect, put on the server with this error:

Warning: fsockopen () [function. fsockopen]: unable to connect to smtp.163.com: 25 (Connection refused) in/home/iee/fair-macau.com/ch/#/class.mail.php on line 75

Warning: socket_set_timeout (): supplied argument is not a valid stream resource in/home/iee/fair-macau.com/ch/#/class.mail.php on line 76

I think the problem is: 1. the U.S. server does not support 163. 2. the email sending settings in the server configuration file are not opened (I think this problem is more credible) 3. Personality problems (haha, joke .) What do you think is wrong? there is no problem with the local test. I used to send the same email and put it on the server.

------ Solution --------------------
Check whether the port is faulty.
------ Solution --------------------
I have also written it, but it is free of charge. this problem is also caused by port number 25 of 163.

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.