private function get_lines() {
    $data = "";
    while($str = @fgets($this->smtp_conn,515)) {
      if($this->do_debug >= 4) {
        echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
        echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
      }
      $data .= $str;
      if($this->do_debug >= 4) {
        echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
      }
      // if 4th character is a space, we are done reading, break the loop
      if(substr($str,3,1) == " ") { break; }
    }
    return $data;
  }
private function get_lines() {
    $data = "";
    while($str = @fgets($this->smtp_conn,515)) {
      if($this->do_debug >= 4) {
        echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
        echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
      }
      $data .= $str;
      if($this->do_debug >= 4) {
        echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '<br />';
      }
      // if 4th character is a space, we are done reading, break the loop
      if(substr($str,3,1) == " ") { break; }
    }
    return $data;
  }
private function get_lines ( ) { $ data = "" ; while ( $ str = @ fgets ( $ this -> smtp_conn , 515 ) ) { if ( $ this -> do_debug >= 4 ) { echo "SMTP -> get_lines(): \$data was \"$data\"" . $ this -> CRLF . '<br />' ; echo "SMTP -> get_lines(): \$str is \"$str\"" . $ this -> CRLF . '<br />' ; } $ data .= $ str ; if ( $ this -> do_debug >= 4 ) { echo "SMTP -> get_lines(): \$data is \"$data\"" . $ this -> CRLF . '<br />' ; } // if 4th character is a space, we are done reading, break the loop
 if ( substr ( $ str , 3 , 1 ) == " " ) { break ; } } return $ data ; }
Read in as many lines as possible
either before eof or socket timeout occurs on the operation.
With SMTP we can tell if we have more lines to read if the
4th character is '-' symbol. If it is a space then we don't
need to read anything else.
@access private
@return string
Read in as many lines as possible either before eof or socket timeout occurs on the operation . With SMTP we can tell if we have more lines to read if the 4th character is - symbol . If it is a space then we don t need to read anything else .