I have the Mimemessage object already. I tried to append some content to the existing content. Using message.getContent() method, i have content object. Then i set setContent using msg.setContent(appendContent, contenttype). Afterwards, i called msg.saveChanges() also. Then from the same mimemessage object i tried to get Rawinputstream from that using msg.getRawInputstream() method. But this returns the oldcontent not the new one. Why?
MimeMessage msg = new MimeMessage(session,inputstream);
String contenttype = msg.getContentType(); // text/plain; charset=utf-8
String content = msg.getContent(); //oldContent
String newContent = content + "\n some new content";
msg.setContent(newContent,contenttype);
msg.saveChanges();
InputStream ins = msg.getRawInputStream(); // returns oldContent stream why???????????