Imap is quite involved, but without seeing the E-mail, my guess would be that the E-mail is either embedding the files or you are fetching the plain text rather than the HTML, so you will need to use imap_fetchstructure()
to get all the parts and then reconstruct the E-mail.
I wrote a very comprehensive wrapper for this a few months back, which you are welcome to take a look at on my GitHub:
https://github.com/craigh411/ImapMailManager
In particular, you might find my factory useful, which handles quite a bit of the type of work you are attempting:
https://github.com/craigh411/ImapMailManager/blob/master/src/Factories/ImapMessageFactory.php
E-mail is not trivial though, it took me weeks to write that package and while it's officially in beta, it is well tested, so you should be able to use it without too much trouble if you so wish.