Fget in smtp function
<p>I want to read last line which is 250  from Ehlo command. Currently it reads the first line which has 250 . Here is the current code</p>

<pre><code>fputs($socket, "EHLO server1.aa.com\r\n"); // ehlo command

$res = fgets($socket, 1024); // read output

if (substr(trim($res), 0, 3) != "250") {
</code></pre>

<p>Please help me modify the code </p>
