I’m trying to parse a mime message using the JavaMail API, I did some research but the steps I found doesn’t work for me, one of them is what was answered here:
Java Email message Parser?
I’m doing it passing an InputStream as a ByteArrayInputStream came from the content I’m trying to parse.
When I do it, my message.getContent leads to an empty String.
I’m using Scala, btw.
It should work, so we’ll need more details of what you’re doing to figure out what’s going wrong.
First, let’s make sure the problem isn’t with your code and the mail message is correctly formatted. Use the msgshow.java demo program that comes with JavaMail to display the message. Use the -m option and redirect stdin from the file containing the MIME message. What does it display?
If that works correctly, show us the code you’re using to read the message.