• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Reading Outlook file by not using Java Mail API

 
Greenhorn
Posts: 14
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have on test.msg outlook file placed in some folder... I want to read this msg file and get the from, to, body and attachment details from it.

Right now i am doing this way:

File file = new File(importEmailFile);
BufferedReader br = new BufferedReader(new FileReader(file));

This gets the msg file as a normal text file... But how do i read it as a outlook file and get the properties of it?

Thanks
Avinash Bhat
[Rob Spoor: removed email address]
 
Sheriff
Posts: 22701
129
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Outlook .msg files are not text files. You shouldn't treat them as such. Try looking at Apache POI: https://poi.apache.org/hsmf/. MAPIMessage looks like it could do the job.

Also, I've removed your email address. Not only will it only attract spam, you should also UseTheForumNotEmail.
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic