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.