the script do not work properly.
the script don't show the attachments (mine does because I fix it), and emails only show properly in the inbox, in the other boxes if you ask for one message it get you the wrong one, only shows some requests correctly.
I'll take a peek. Thanks.
hi, to fix the attachments simple change the word attachments to caps lock, like: From this: disposition == 'attachment' To this: disposition == 'ATTACHMENT'
But them i found other problem if there is more there one attachment it shows the attachments but gives this error:
Notice: Undefined property: stdClass::$disposition in C:\wamp\www\php-imap-master\classes\imap.class.php on line 187
I fix it doing this:
if($i->ifdisposition == 'ATTACHMENT'){
} else{ if($i->disposition == 'ATTACHMENT'){ $part = $x+1; $array['attachments'][] = array('type'=>$i->subtype,'bytes'=>$i->bytes,'name'=>$i->parameters[0]->value,'part'=>$part,'msgno'=>$messageNumber); } }
I just wrapped the if inside other if verifying if the 'ifdisposition' is equal to ATTACHMENT, it will never be equal so it will do the else, and don't show the error.
PS: all this is inside the public function returnEmailMessageArr()
i found another error, the script don't show the body of the email, the way I found to put it working was in the index.php, change the base64_decode($email['html']) to quoted_printable_decode($email['html']).
the message don't work properly in the other folders beside INBOX because you are doing the message number like this:
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 [10] => 11 [11] => 12 [12] => 13 [13] => 14 [14] => 15 [15] => 16 [16] => 17 [17] => 18 )
when you should be getting the message original number ( the one that imap_search( you stream, 'ALL', SE_UID) returns ) which in my case would be:
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 10 [7] => 12 [8] => 14 [9] => 19 [10] => 20 [11] => 21 [12] => 22 [13] => 23 [14] => 24 [15] => 30 [16] => 34 [17] => 35 )
You should fork and commit your fixes.
I have already done that, the only thing that i can´t fix is the messages numbers, mainly because I can't find a way without rewrite almost all of you code.
So I would be very glad, if you could do that.
thanks
okay leeme see what i can do.
Hi, any news?