public function setText($data)
    {
        if (empty($data)) {
            throw new Exception('You must not call MimeMailParser::setText with an empty string parameter');
        }

        if (substr($data, -1) != "\n") {
            $data = $data.PHP_EOL;
        }

        $this->resource = mailparse_msg_create();
        // does not parse incrementally, fast memory hog might explode
        mailparse_msg_parse($this->resource, $data);
        $this->data = $data;
        $this->parse();

        return $this;
    }
public function setText($data)
    {
        if (empty($data)) {
            throw new Exception('You must not call MimeMailParser::setText with an empty string parameter');
        }

        if (substr($data, -1) != "\n") {
            $data = $data.PHP_EOL;
        }

        $this->resource = mailparse_msg_create();
        // does not parse incrementally, fast memory hog might explode
        mailparse_msg_parse($this->resource, $data);
        $this->data = $data;
        $this->parse();

        return $this;
    }
public function setText ( $ data ) { if ( empty ( $ data ) ) { throw new Exception ( 'You must not call MimeMailParser::setText with an empty string parameter' ) ; } if ( substr ( $ data , - 1 ) != "\n" ) { $ data = $ data . PHP_EOL ; } $ this -> resource = mailparse_msg_create ( ) ; // does not parse incrementally, fast memory hog might explode mailparse_msg_parse ( $ this -> resource , $ data ) ; $ this -> data = $ data ; $ this -> parse ( ) ; return $ this ; }
Set the email text

@param string $data

@return Parser MimeMailParser Instance
Set the email text