Reading Thunderbird "mozMapi32_InUse.dll" source code - java

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.

Related

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.

Copying public folders from a MS exchange server in java

I am currently looking into copying public folders and the containing emails from a MS exchange server 2003 to a local directory in window explorer, in the same structure, so I will then have the directories and the .msg files on my local drive.
I have researched this, but unsure what route to go down. MAPI, Webdav, IMAP, Javamail etc.
I will be creating a Java app to do the copying also. Also open to any other software development recommendations (Perl, C++)
What would be the best protocol to do this and also anyone got any links where I can do some more research on this subject?
Many thanks
JavaMail can't create .msg files, which are a proprietary Microsoft format, so if that's a key part of your requirements you'll need to look at something else.
If a .eml file (effectively a MIME format file) or a Unix mail format file would be sufficient, you can consider JavaMail.
JavaMail includes a demo program that copies a mailbox hierarchy from one store to another.
There are several options for storing messages locally.
Run an IMAP server on the local machine. This is probably the easiest.
Use a local store provider, such as the JavaMail mbox provider or another such provider from the JavaMail Third Party Products page.
Write your own code to store each message to disk using the MimeMessage.writeTo method.
Hope that helps.

Programming thunderbird Email Client?

Anyone has C#/Ruby/Python/Java or Perl scripts to get all the emails in a folder in Thunderbird client and download all the attachments?
I have more than 200 resumes as attachment kept in Resumes folder of thunderbird and I need to download the attachment and categories them. Any API reference to program thunderbird would be great..
I found this http://kb.mozillazine.org/Calling_Thunderbird_from_other_programs but I am looking for specific code samples..
Other references
https://developer.mozilla.org/en/pyxpcom
If you are happy using existing tools, instead of writing your own, you could give the Thunderbird Add-on AttachmentExtractor a try.
Give this a try:
How To Bulk Export Thunderbird Email & Attachments
http://blog.taragana.com/index.php/archive/how-to-bulk-export-thunderbird-email-attachments/

forward all incoming qmail / vpopmail emails to a program on linux

I want to set up a program where all incoming emails into vpopmail of the form
12345678#mydomain.com get forwarded to a java program / daemon that is running
the java program will receive the information about the person sending the email
so it needs to access the standard email and from the account (in the above case 12345678) infer where to send it on. then once it has received a confirmation code from the daemon, delete the email
I'm using a qmail / vpopmail combination on linux (debian), so I'd rather that fire an event to my java daemon than poll the mail accounts, through the java mail extensions.
Any help is greatly appreciated
I'm using a qmail / vpopmail combination on linux (debian), so I'd rather that fire an event to my java daemon than poll the mail accounts, through the java mail extensions.
This sentence implies that you must use IMAP/POP3 access to poll a mail account. If your java app is on the same host as the mail server, it could also poll a Maildir directory directly by looking for new files in the path_to_maildir_folder/new directory.
Maildir on wikipedia
Look into procmail and formail -- see the procmailex manual page and the procmail-lib package on Debian.
Use procmail if it is installed on your system. Put these lines in a .procmailrc file in the home directory of the user who receives the e-mail.
:0
| /path/to/your/program
Or you can instead use a .forward file containing
"|/path/to/your/program"
Procmail has the advantage that it allows you to deal with more complicated filtering if your application ever requires it.
Your program will read the headers and body of the e-mail from stdin.

Categories