Java + MS Exchange: how to retrieve .msg files - java

I've created a Java program with which I can retrieve mail from an Exchange mailserver. Problem is: the mail is in EML format and I need the MSG format!
Right now I'm retrieving mail through the web access part of Exchange, using the Apache Slide project... is it possible at all to use java to retrieve msg files from an Exchange server?
I've seen examples of C# code, .NET code etc.. isn't it possible somehow to integrate these pieces of code with Java so I can use it to retrieve mail?
Greets,
Cesar

I've done this in Java using Dmitry's RDO library, which is a sub-part of his Outlook Redemption library. See http://www.dimastr.com/redemption/rdo/default.htm. The library builds on top of MAPI. You will need a COM library for this also for which I've used JACOB (Java COM Bridge). See http://sourceforge.net/projects/jacob-project/

Related

Client Server Application with SigmaJS in Java

I want to make a client/server application with SigmaJS in Java. I make the server file which create the JSON file. Do you known how can I "call" SigmaJS application with the JSON file to create the graph?
Have you take a look at this example : https://github.com/jacomyal/sigma.js/blob/master/examples/load-external-json.html ?

Is it possible to get e-mail source using JavaMail?

I use JavaMail API to download mails via IMAP. I want to save them locally, in files. I have a DB, but I only want to store some meta-data in it (like mail file location).
Is there a possibility, using the JavaMail API, to get the actual source of an e-mail? Like in Outlook via context menu on a mail in a list and 'View Source'.
Thanks,
Daniel
After some more API reading I've found a solution.
javax.mail.Part#writeTo(OutputStream)
does the thing.

Getting services.wsdl for Microsoft Exchange online

I am trying to write a small Java client for consuming services provided by Microsoft Exchange server through Exchange Web Services (EWS). For experimenting I set up Exchange Online account from here.
Then I configured my Outlook client to use the newly created mail on exchange and outlook's Test Email Auto-Configuration windows I tried to retrieve the link for Services.wsdl for that client:
Then I tried hitting Availability Services url, entered the username and password and it opened following page:
I then tried to hit the url specified on that page for service.wsdl, but it gave Page Not Found error. SO
Q1 where will I get WSDL file, and
Q2 which link should I hit while developing Java client. In my office environment I get WSDL file over configured Exchange server which directly opens WSDL file but am guessing what should be in case of exchange online.
Q1 - The WSDL file can be downloaded from the Exchange server endpoint that you wish to hit. I don't have credentials to try this, but this should work:
https://outlook.office365.com/EWS/Services.wsdl
It's usually in the EWS directory and named Services.wsdl. I just looked at your other screenshots above and inferred the same format.
Q2 - For Office 365 (which you are testing with), Microsoft recommends this approach for manually finding the URL to hit for API calls. (Alternative much more detailed desciption here: How to get services.wsdl for Office 365?)
However building the stubs yourself and finding URLs to invoke is a lot of work that you don't have to do if you use a pre-built Java library such as Microsoft's own EWS Java API or this 3rd party library. They both do basically the same thing, which is to expose Java classes in a Jar that allow you to make calls to any Exchange server. They will also take care of automatically discovering the URL to use, if you wish (it's a feature called Autodiscover).

Android - JavaMail with Gmail ID

I'm writing an application which will need to be able to receive email from a specific account (in this instance Gmail) and get the unique Gmail ID of each message in order for it to create a link to that message for future reference.
All of this can be done in Java using the JavaMail API and the GmailMessage class and connecting via 'gimaps'. However this API doesn't compile when imported into my Android application - Unable to execute dex: Multiple dex files define Lcom/sun/mail/iap/AString I get different variations of these depending on which jars I try to import (pop3, imap, gimap etc)
Searching around it seems I need to use one of the JavaMail android ports however none of them have the ability to grab the Gmail unique message id.
So my question is does anyone know of a way to do this on Android, using either the official JavaMail API (if that's possible) or using on the various ports?
Thanks.
EDIT:
Thanks, actually I've got it partially working using a port found here https://code.google.com/p/java-gmail-imap/ however it crashes when trying to grab the body of text from the email. I know this is due to the same files missing that are corrected in this port https://code.google.com/p/javamail-android/
I've checked out the java-gmail-imap code into eclipse to try and add the missing classes from the android port but everytime I export I get java.lang.NoClassDefFoundError: com.google.code.javax.mail.Session
Opening the jar file this class is present.. anyone know what I could be doing wrong?
Unfortunately, Android isn't Java, so some of this stuff might not work.
Based only on the error message, it looks like you've tried to import multiple jar files that define the same class (com.sun.mail.iap.AString). Check that you don't have more than one copy of JavaMail in your application.
I managed to get this working using the library found here and changing some of the imports to the myjava.* imports from the Android Java Mail port.

java facebook api chat system access

Does java facebook api has access to the chat system ? I can't see the package .If it does can you show it, and if it doesn't how can i access the chat system with java ?
It doesn't look like it. You may need to build your own client against the chat documentation:
https://developers.facebook.com/docs/chat/
If you're using Java, I suggest you use Smack to help with this:
http://www.igniterealtime.org/projects/smack/
Facebook chat is XMPP compliant so all you need to start is an XMPP lib for Java
first gooogle result return http://code.google.com/intl/it-IT/appengine/docs/java/xmpp/overview.html

Categories

Resources