
asdfghjkl - 2007-07-26 12:24:11 -
In reply to message 2 from Manuel Lemos
OK that's good to hear.
I'm trying to integrate your class into my POP fetch script at the moment. I have collected the body of my e-mail and saved it to an variable and now I want your class to read from that integer.
In my previous post I had used imap_savebody and then manually set your script to read from that file.
I am getting 'NULL' returned from the integer $decoded now though.
This is a small piece of my code which I am using:
for ($i = 1; $i <= $numMessages; $i++) {
$attachNum = 0;
$struct = imap_fetchstructure($mailbox, $i);
$body = imap_body($mailbox, $i);
$mime=new mime_parser_class;
$mime->mbox = 1;
$mime->decode_bodies = 0;
$mime->ignore_syntax_errors = 1;
$parameters=array(
'Data'=>$body
);
var_dump($decoded[$message]);
There is more code below that but it's code which wouldn't affect your class.
The $body variable does contain an e-mail message if I print_r it.
Regards,