When php uses fsockopen, the rn and n Terminator in fwrite causes smtp.qq.com to respond incorrectly.

Source: Internet
Author: User
When php uses fsockopen, the rn and n Terminator in fwrite causes smtp.qq.com to respond incorrectly.
 "; Var_dump (stream_get_meta_data ($ sk); fclose ($ sk );

Test Code



The qq server may have changed recently. remember that \ n can be used as the end character of a row, that is, fwrite ($ sk, "kkk \ n") then get the response, and fgets will be able to succeed immediately. after testing 163, \ n is no problem. Recently, I found that \ n of qq has a problem, as a result, no response is returned. fgets causes an exception because there is no content in the buffer until the read times out. however, after qq is changed to \ r \ n, it will be normal.


Therefore, smtp.qq.com and smtp.exmail.qq.com all have this problem.

I started to think that some people have turned it into an ssl problem, but it is not. The current port 25 can still be used 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.