src/core/framework/core/3rdparty/ezcomponents/Mail/src/parser/parts/rfc822_parser.php
public function parseBody( $origLine )
    {
        $line = rtrim( $origLine, "\r\n" );
        if ( $this->parserState == self::PARSE_STATE_HEADERS && $line == '' )
        {
            $this->parserState = self::PARSE_STATE_BODY;

            // clean up headers for the part
            // the rest of the headers should be set on the mail object.

            $headers = new ezcMailHeadersHolder();
            $headers['Content-Type'] = $this->headers['Content-Type'];
            if ( isset( $this->headers['Content-Transfer-Encoding'] ) )
            {
                $headers['Content-Transfer-Encoding'] = $this->headers['Content-Transfer-Encoding'];
            }

            if ( isset( $this->headers['Content-Disposition'] ) )
            {
                $headers['Content-Disposition'] = $this->headers['Content-Disposition'];
            }

            // get the correct body type
            $this->bodyParser = self::createPartParserForHeaders( $headers );
        }
        else if ( $this->parserState == self::PARSE_STATE_HEADERS )
        {
            $this->parseHeader( $line, $this->headers );
        }
        else // we are parsing headers
        {
            $this->bodyParser->parseBody( $origLine );
        }
    }
public function parseBody( $origLine )
    {
        $line = rtrim( $origLine, "\r\n" );
        if ( $this->parserState == self::PARSE_STATE_HEADERS && $line == '' )
        {
            $this->parserState = self::PARSE_STATE_BODY;

            // clean up headers for the part
            // the rest of the headers should be set on the mail object.

            $headers = new ezcMailHeadersHolder();
            $headers['Content-Type'] = $this->headers['Content-Type'];
            if ( isset( $this->headers['Content-Transfer-Encoding'] ) )
            {
                $headers['Content-Transfer-Encoding'] = $this->headers['Content-Transfer-Encoding'];
            }

            if ( isset( $this->headers['Content-Disposition'] ) )
            {
                $headers['Content-Disposition'] = $this->headers['Content-Disposition'];
            }

            // get the correct body type
            $this->bodyParser = self::createPartParserForHeaders( $headers );
        }
        else if ( $this->parserState == self::PARSE_STATE_HEADERS )
        {
            $this->parseHeader( $line, $this->headers );
        }
        else // we are parsing headers
        {
            $this->bodyParser->parseBody( $origLine );
        }
    }
public function parseBody ( $ origLine ) { $ line = rtrim ( $ origLine , "\r\n" ) ; if ( $ this -> parserState == self :: PARSE_STATE_HEADERS && $ line == '' ) { $ this -> parserState = self :: PARSE_STATE_BODY ; // clean up headers for the part // the rest of the headers should be set on the mail object. $ headers = new ezcMailHeadersHolder ( ) ; $ headers [ 'Content-Type' ] = $ this -> headers [ 'Content-Type' ] ; if ( isset ( $ this -> headers [ 'Content-Transfer-Encoding' ] ) ) { $ headers [ 'Content-Transfer-Encoding' ] = $ this -> headers [ 'Content-Transfer-Encoding' ] ; } if ( isset ( $ this -> headers [ 'Content-Disposition' ] ) ) { $ headers [ 'Content-Disposition' ] = $ this -> headers [ 'Content-Disposition' ] ; } // get the correct body type $ this -> bodyParser = self :: createPartParserForHeaders ( $ headers ) ; } else if ( $ this -> parserState == self :: PARSE_STATE_HEADERS ) { $ this -> parseHeader ( $ line , $ this -> headers ) ; } else // we are parsing headers { $ this -> bodyParser -> parseBody ( $ origLine ) ; } }
Parses the body of an rfc 2822 message.

@throws ezcBaseFileNotFoundException
if a neccessary temporary file could not be openened.
@param string $origLine
Parses the body of an rfc 2822 message .