Well, you can use a regular expression to catch the boundary and put it into a variable.
Then split al the content by that boundary and search with another regexp in the generated array to see if it's the actual html part.
However, to display any images it would be a bit more complex, I'll leave it to you.
Onto the second subject.
Open a socket to your mailserver, and then, talk to it using the pop3 commands.
If you don't know how to do this, try reding about using sockets, there's a nice article here at PHPBuilder. Also read about the pop3 commands.
So, try doing this, and if you can't, come back and I'll help you.
--Make things as simple as you can, but not simpler.
Albert Einstein.