how to open attached document from outlook using java? - java

is it possible to open attached document from outlook using java?
Every hour i receive email with text file attached.
i have to open and extract some data from this text file and store it into another text file.
So what i'm doing is to open the email, then right-click and save the attached file for extracting data it's ok.
How could i do it fastly?
thanks

If you receive your mails using IMAP, then you could write a Java application and use JavaMail to connect to the IMAP server, get the mail, and extract data from the attachments.

You can conntect to Outlook with a COM-wrapper. There are libraries like COM4j. You can access the email, extract the data. But IMAP is much simpler.

Related

Reading Thunderbird "mozMapi32_InUse.dll" source code

As you probably know thunderbird is an open-source email client. I'm trying to read their mozMapi32_InUse.dll source code, but I can't find it anywhere on their page. They use it for receiving email data from the Windows API, using that data they fill out their email interface.
My goal is to build an application that will receive file path if a user on Windows does right-click to file --> Send to ---> Mail Recipient
In this action, my application needs to receive that file path.
Mozilla Thunderbird does the same thing using their custom dll mozMapi32_InUse.dll and I'm interested to see how I can do the same.

How to automate conversion of email of an acount on mail server to .eml file using java

I have postfix email server configure on a linux machine. There is a email account e.g xyz#emailaccount.com is available on this mail server.
What exactly I want to do is Whatever email come to this email id should be converted to .eml file and this .eml file should be stored on a perticular location on hard disk.
I want to automate this above process using java program. I thought that my java progam will run after certain interval of time using schedular and check for any new email. As soon as he found any new email he will
convert that email to .eml file and store this file on a perticular location. The mail coming to this email id mostly dont have any attachment to them. But still I want my program robust so that if unfortunately if some
email comes with an attachment in that case the java program should not stop working.
Following are my questions that I want to ask to expert.
Is what am I expecting in above case is possible? and Whether is it possible in java?
As I checked on mail server the mail files for above email id have very long name and I dont found any extension to them. So How do I read mail in these files and convert them in .eml format using java.
If you know any tutorial related to above task or any reference link of code then please let me know about it.
I check on web and found that java have javamail api. Is this pacakage is helpfull for me to do above task or do I have to use any other api for java? If you know anything it it please let me know.
Please help me in above task friends.
Thanks in advance
Yes, it's possible.
The simplest approach is to run an IMAP mail server to allow you to read the messages using JavaMail. There are several IMAP mail servers available for Linux.
See the documentation on the JavaMail project page, especially the JavaMail FAQ.
Use JavaMail.

Read emails stored in Thunderbird with Java

I need a way to read the stored emails in Thunderbird with Java and retrieve attached files.
The problem is that I have an old FoxPro app that reads Zip files from a folder. The FoxPro used to retrieve those files from attachments into the emails in Outlook Express, when we installed Outlook 2007 this function of retrieve the files from Outlook didn't work anymore so it was replaced with a simple Java app (reading directly from the PST file). So now FoxPro app executes the Java app to retrieve those files.
Now I want to replace Outlook 2003 with Thunderbird and I want to read the emails from there.
IMPORTANT: The accounts are POP3 so I can't use IMAP to extract files directly from the email server.
There is a lib or something?
As best I know there is no Java support, directly or by 3rd party library. Having said that, I've looked at the way emails are persisted onto disk and you should be able to access those files directly with a Java app. Attachments are stored inline and although I haven't tried to code an extraction app in Java, the structure and syntax of the attachments reminded me of the way attachments are stored in newsgroups (access via NNTP).
Thunderbird stores messages in mbox (loosely described in RFC 4155) files, with separate files for index/flags. GNU JavaMail should be able to read the mail store. That's just the first implementation I found, it may not be that hard to write another one.

How to download email messages as .msg files

Programatically using Java, is it possible to download and save emails from Exchange Server as .msg files?
If not, are there any formats possible, which can be opened with Outlook
The solutions received were commercial options which for me is out of scope right now.
The second part in my question was if I can save in any other format. I have figured out that I can save them as .eml file which also can be opened in Outlook. This will solve the problem for me.
You can use Outlook Object Model (see MailItem.SaveAs) if you have a local Outlook profile configured to access the Exchange mailbox in question.
You can also use Redemption (I am its author) to dynamically connect to an Exchange mailbox (RDOSession.LogonExchangeMailbox), iterate through the messages and save them in the MSG format (RDOMail.SaveAs).

uploading an email file using jquery

I am creating drag and drop file uploader using jquery. when i tried to drag an email file from ms outlook or apple mailbox and drop into that jsp file ,it's not accepting the email content.
Can anyone help me to resolve this problem?
Your problem is that you're not drag/dropping a file. Try saving the content of the email to a .txt file (or Word, etc), and then uploading.

Categories