I keep getting broken images with IMAP_fetchbody

I keep getting broken images with IMAP_fetchbody
0.0 0

#1
$structure= imap_fetchstructure($mbox, $newmsgnumber);
	if ($structure->encoding == 4){$bodyhtml = quoted_printable_decode(imap_fetchbody($mbox, $newmsgnumber,1.2));} 
	elseif ($structure->encoding == 3){$bodyhtml = base64_decode(imap_fetchbody($mbox, $newmsgnumber,1.2));}
	elseif ($structure->encoding == 0){$bodyhtml = quoted_printable_decode(imap_fetchbody($mbox, $newmsgnumber,1.2));}

Any suggestions?


#2

Can you explain in detail what you expect the above code to do?

What do the variables $mbox and $newmsgnumber contain?


#3

Sure I am sorry, the $mbox variable is:
$mbox = imap_open($hostname, $username, $password);
and $$newmsgnumber is the number of the last messages in the inbox. That all works correctly. Right now it pulls up the email and that text but if the email has an image it brings up a broken image icon. That is what I am looking to fix.


#4

Is there anyone out there who can help?