Hi,
I wrote a little program which downloads emails, using JavaMail API. I use the method getContent() of message object to get the content of the message,
I handled two conditions while reading the email message content..
1- I can either get an object of type
String (if the email message is just a plain text) or
2- I can get an object of type Multipart (if the email has attachments)
code looks something like this
it was working fine, now we are in process of changing the email server, previously it was IBM Domino (running on windows), and we are planning to shift to SendMail (running on unix), But the problem that I am facing now, is that I am only getting an object of type
javax.mail.util.SharedByteArrayInputStream from getContent() method of Message object. How do I convert this input stream to the expected format ? Tried using MimeBodyParty object, but was not all the helpful. Any pointers, suggestions will be greatly appreciated.