Extract sender info from DBX or EML files

to all of you PHP experts,

Can I do this? I know, at least I think, that almost any language available can loop through files on a windows system, and extract data out of them via I/O. In PHP, I have really only made use of the FOPEN() function and a few others like it. I like this language, but I have never written a desktop app in PHP to do any task. Would I be correct in assuming that almost all languages can stream data in and out of any given file type? I don’t really know all of the issues involved with this and/or why it can/can’t be done. I have a customer that has 1000 DBX files which contains massive amounts of email data inside single folders, which is the result of a technician transferring Outlook Express email data from one disk to another by simply dragging and dropping icons. He didn’t care about the details.

These DBXs can be converted to EMLs with a 3rd party tool I’ve already given him, but each DBX has to be run separately and each time it’s run the result is like 100 EML files that are output from the 1 DBX. Thus, if I can pull the data I want out of the DBX files it would be much easier and would take no time at all simply by running a script.

Anyone have any thoughts on the best language to use for this, or if it can be even be done?


PHP certainly has the tools to do it; the question is whether the file format makes it easy or not.

To find out, try opening a dbx file in notepad. If you can see plain text in notepad it means the file is stored in plain text and you just need to go through it line by line looking for the pattern you need and saving them; PHP has a lot of built in functions to help do this.

If you just see a load of garbage, it means the file is stored in some binary format and you’ll need to figure that format out to get information out of it. PHP can also do that, but it can’t figure out the file structure for you. If the file format is binary, you’d be better off looking for a ready made tool to help you with the job.

it is not in plain text. I have already checked that. do you know of any ready made tools? someone pointed out that Python has had this covered for a long time. just by happenstance I ran into them, and they mentioned this: https://pypi.org/project/emaildata/

I am going to give that a try before attempting to use PHP. thank you so much for the response.

Sponsor our Newsletter | Privacy Policy | Terms of Service