File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Java + MS Exchange: how to retrieve msg files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java + MS Exchange: how to retrieve msg files" Watch "Java + MS Exchange: how to retrieve msg files" New topic

Java + MS Exchange: how to retrieve msg files

Cesar Koot

Joined: Dec 10, 2009
Posts: 7
Hello friends,

I'm having trouble retrieving e-mail from an Exchange server using Java. Right now I use the Apache Slide project to set up a connection with the OWA web access part of the Exchange server, so I can retrieve EML files. But for my project I need MSG files... Is there any way to convert the EML files to MSG, or is there a way to retrieve MSG files directly from Exchange? Any help would greatly be appreciated, my project ends at the end of this month so there's quite a bit of hurry to this...

I crossposted this question on stackoverflow:

Ryan Webb

Joined: Dec 09, 2009
Posts: 28
I don't know apache slide, but I have created email software before,
You never mentioned JavaMail API in your message.

Try JavaMail API, then please ask you Mail Server admin for SMTP, POP3 ports and then Authentication stuff.
JavaMail API provides methods to access your inbox, send messages, etc.

for eml types, I believe there's a method for that...lets you specify mime types. But I have no experience with EML's.

Hope my information helps you.
Ryan Webb

frustrated to learn c/c++/objective-c
mark goking
Ranch Hand

Joined: Aug 18, 2009
Posts: 155
you can easily do that using Java Mail

Website/Java Games:
Tech Blog:
Rob Spoor

Joined: Oct 27, 2005
Posts: 20275

Not quite. Exchange uses its own protocol which is not open, so there are very few Java libraries for it, and even fewer non-commercial ones.

The good thing is that Exchange also supports IMAP and POP3. If these are enabled for the mail box you can simply use JavaMail; contact your system administrator if you need them enabled.

How To Ask Questions How To Answer Questions
mark goking
Ranch Hand

Joined: Aug 18, 2009
Posts: 155
rob. yes. if the IMAP is enabled ;)
I agree. Here's the link:
subject: Java + MS Exchange: how to retrieve msg files
It's not a secret anymore!