You just have to know what you're attaching. Whenever I'm not sure of the MIME type of a file extension I'll usually either Google it or check the "mime.types" file in my Apache config dir. Eg:
Code:
image/jpeg jpeg jpg jpe
So it seems as if your mime type is accurate. The problem is most likely somewhere else. I assume your readFile method returns a byte[]? Have you tried using a png image (or just a simple text email) instead? Work on getting a baseline.
BTW, you don't need to create any temporary files - just cache your content in memory.