This is my code.

PHP Code:
$message imap_fetchbody($inbox$email_number1.2);
                        if (
$message == "") {
                            
$message imap_fetchbody($inbox$email_number1.1);
                        }
                        if (
$message == "") {
                            
$message imap_fetchbody($inbox$email_number1);
                        }
                
$FindHashes stripos($message"####");
                
$StaffMessage = (substr($message,0,$FindHashes))."</body></html>";
                
$StaffMessage quoted_printable_decode($StaffMessage);
                
$StaffMessage htmlspecialchars($StaffMessageENT_QUOTES); 
Yes it may look a bit untidy, but that is not the problem. The problem I'm having is that if the email (sent from outlook '07) does not have an attachment I don't get anything but a nasty looking plain text email. If I do have an attachment on the email then I get lovely colored formatted email.

FYI I am decoding the htmlspecialchars before I display them.

How do I get a nice email if there is nothing attached?

Thanks in advance