kevinsir / php-mime-mail-parser

Automatically exported from code.google.com/p/php-mime-mail-parser
0 stars 0 forks source link

Call to undefined method MimeMailParser::setStream #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have mailparse and mbstring installed on my PHP5+ installation and yet I 
still cannot get it to work properly.

I get this error:

<br /> <b>Fatal error</b>:  Call to undefined method 
MimeMailParser::setStream() in <b>/home/texts/public_html/email/attach.php</b> 
on line <b>10</b><br />

I am using email piping and this is email.php
#!/usr/bin/php -q
<?php

/**
 * To run this example you need to pass in some input via STDIN
 */

require_once('MimeMailParser.class.php');

$Parser = new MimeMailParser();
$Parser->setStream(STDIN);

$to = $Parser->getHeader('to');
$delivered_to = $Parser->getHeader('delivered-to');
$from = $Parser->getHeader('from');
$subject = $Parser->getHeader('subject');
$text = $Parser->getMessageBody('text');
$html = $Parser->getMessageBody('html');
$attachments = $Parser->getAttachments();

// dump it so we can see
var_dump(
        $to,
        $delivered_to,
        $from,
        $subject,
        $text,
        $html,
        $attachments
);

?>

Original issue reported on code.google.com by coltongr...@gmail.com on 19 Oct 2014 at 4:48