public function getLine( $trim = false )
    {
        $data = '';
        $line = '';

        if ( is_resource( $this->connection ) )
        {
            // in case there is a problem with the connection fgets() returns false
            while ( strpos( $data, self::CRLF ) === false )
            {
                $line = fgets( $this->connection, 512 );

                /* If the mail server aborts the connection, fgets() will
                 * return false. We need to throw an exception here to prevent
                 * the calling code from looping indefinitely. */
                if ( $line === false )
                {
                    $this->connection = null;
                    throw new ezcMailTransportException( 'Could not read from the stream. It was probably terminated by the host.' );
                }

                $data .= $line;
            }

            if ( $trim == false )
            {
                return $data;
            }
            else
            {
                return rtrim( $data, "\r\n" );
            }
        }
        throw new ezcMailTransportException( 'Could not read from the stream. It was probably terminated by the host.' );
    }
public function getLine( $trim = false )
    {
        $data = '';
        $line = '';

        if ( is_resource( $this->connection ) )
        {
            // in case there is a problem with the connection fgets() returns false
            while ( strpos( $data, self::CRLF ) === false )
            {
                $line = fgets( $this->connection, 512 );

                /* If the mail server aborts the connection, fgets() will
                 * return false. We need to throw an exception here to prevent
                 * the calling code from looping indefinitely. */
                if ( $line === false )
                {
                    $this->connection = null;
                    throw new ezcMailTransportException( 'Could not read from the stream. It was probably terminated by the host.' );
                }

                $data .= $line;
            }

            if ( $trim == false )
            {
                return $data;
            }
            else
            {
                return rtrim( $data, "\r\n" );
            }
        }
        throw new ezcMailTransportException( 'Could not read from the stream. It was probably terminated by the host.' );
    }
public function getLine ( $ trim = false ) { $ data = '' ; $ line = '' ; if ( is_resource ( $ this -> connection ) ) { // in case there is a problem with the connection fgets() returns false while ( strpos ( $ data , self :: CRLF ) === false ) { $ line = fgets ( $ this -> connection , 512 ) ; /* If the mail server aborts the connection, fgets() will
                 * return false. We need to throw an exception here to prevent
                 * the calling code from looping indefinitely. */ if ( $ line === false ) { $ this -> connection = null ; throw new ezcMailTransportException ( 'Could not read from the stream. It was probably terminated by the host.' ) ; } $ data .= $ line ; } if ( $ trim == false ) { return $ data ; } else { return rtrim ( $ data , "\r\n" ) ; } } throw new ezcMailTransportException ( 'Could not read from the stream. It was probably terminated by the host.' ) ; }
Returns one line of data from the stream.

The returned line will have linebreaks removed if the $trim option is set.

@throws ezcMailTransportConnection
if there is no valid connection
@param bool $trim
@return string
Returns one line of data from the stream .