简体   繁体   中英

Best way to retrieve attachments from MS Exchange

We tried using the JavaMail API for a while, but we sporadically received ArrayIndexOutOfBounds errors documented by this bug report: http://kenai.com/bugzilla/show_bug.cgi?id=3155

It was marked as fixed, but we continued to have that error actually. Additionally, the performance using JavaMail to retrieve attachments was consistently very slow. On the order of around 10 KB/s even when on the same network as Exchange so we decided to try a different approach.

We found that we were able to get significantly better performance using a Mapi client called MoonRug: http://www.moonrug.com/features.html

This worked substantially better than JavaMail, but we still have errors every now and then connecting to Exchange and downloading attachments (of varying sizes from 3KB to 20MB).

I am starting to question if having Java call Exchange directly is even the right approach for us to take. Does anyone have a recommendation for a better way to do this? We are primarily a java shop, but if there is a different tool or technology that can take emails from Exchange and put them on the file system somewhere for a java process to read and process that is an option for us.

The goal of this application is to take incoming mail on a certain inbox and save them and the attachments to a back end system that users can interact with. We currently do a pull process where we poll the inbox every minute. If there is some way to make this a push process by integrating something into Exchange Server directly to take email and automatically export them onto a file system that would also be an option for us.

You may want to take a look at DavMail . It's Java based, and it does access Exchange. It may or may not provide you with code you can use. Otherwise, it may allow you to use it as a gateway between your JavaMail-based app and Exchange.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM