Maybe i missed something along the way but here is the problem. If a message has html and an attachment then when you try grabbing the body with
imap_fetchbody($mbox, $num, 1);
It retrieve the message body which contains both the plain text and HTML version.
So if the message had 2 parts:
1 - Body
2 - Attachment
Both plain text and html are in the first part (and attachment in the second).
How do you then go about splitting the body (the first part) up into 2 new parts?
Derek C.