I"m trying to edit email files that are saved on a network drive. They are in the msg file format. I'm able to read them into the a string value using Simple Java Mail, but i need to add some text to the body of the email and when i do, it removes the body of the email. It doesn't seem to matter where i put the text.
I've tried add the text at various places in the string, but no location seems to work.
File f = new File("EMAIL FILE");
// EmailConverter is from Simple Java Mail
String eml = EmailConverter.outlookMsgToEML(f);
// Various attempts to add the text at multiple locations
BufferedWriter out = new BufferedWriter(new FileWriter(outputLocation));
out.write(eml);
out.close();
What i'm looking for is that the text gets added to the start of the body of the email.