public function setPath($path)
    {
        if (is_writable($path)) {
            $file = fopen($path, 'a+');
            fseek($file, -1, SEEK_END);
            if (fread($file, 1) != "\n") {
                fwrite($file, PHP_EOL);
            }
            fclose($file);
        }

        // should parse message incrementally from file
        $this->resource = mailparse_msg_parse_file($path);
        $this->stream = fopen($path, 'r');
        $this->parse();

        return $this;
    }
public function setPath($path)
    {
        if (is_writable($path)) {
            $file = fopen($path, 'a+');
            fseek($file, -1, SEEK_END);
            if (fread($file, 1) != "\n") {
                fwrite($file, PHP_EOL);
            }
            fclose($file);
        }

        // should parse message incrementally from file
        $this->resource = mailparse_msg_parse_file($path);
        $this->stream = fopen($path, 'r');
        $this->parse();

        return $this;
    }
public function setPath ( $ path ) { if ( is_writable ( $ path ) ) { $ file = fopen ( $ path , 'a+' ) ; fseek ( $ file , - 1 , SEEK_END ) ; if ( fread ( $ file , 1 ) != "\n" ) { fwrite ( $ file , PHP_EOL ) ; } fclose ( $ file ) ; } // should parse message incrementally from file $ this -> resource = mailparse_msg_parse_file ( $ path ) ; $ this -> stream = fopen ( $ path , 'r' ) ; $ this -> parse ( ) ; return $ this ; }
Set the file path we use to get the email text

@param string $path File path to the MIME mail

@return Parser MimeMailParser Instance
Set the file path we use to get the email text