How to get access to the raw emails present in Apache James Mail archive folder through my Java code? -


i have set own apache james mail server used receiving , sending mails. setup working able send , receive mails properly. need raw email (i.e filestreamstore file) present in james-2.3.2\apps\james\var\mail\archive folder in java code. using org.apache.mailet.mail access mails to/from james, unable find method lets me access raw email files directly. have move raw emails own folder, untouched. there should not modification on raw email file. there way file java program? api or library me it?

here sample raw email:

received: <receiver ip address> (<receiver ip address>)           <machine name> (james smtp server 2.3.2) <smtp id>           <abc@example.com>;           thu, 7 sep 2017 15:56:44 +0530 (ist) from: "from email name" <sender@example.com> to: "to email name" <from@example.com> subject: 3:56 pm date: thu, 7 sep 2017 15:56:43 +0530 message-id: <message id> mime-version: 1.0 content-type: multipart/alternative;     boundary="----=_nextpart_address" x-mailer: <mail client name> thread-index: <thread index id> content-language: en-us  multipart message in mime format.  content-type: text/plain;     charset="us-ascii" content-transfer-encoding: 7bit  <message body> 

if additional info required, please ask in comments.

note: cannot directly use file path raw email in java because @ 1 time, multiple emails received , never know 1 belongs email archive files' names random. has current org.apache.mailet.mail object.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -