Mail Detector (Mbox, EML)

Hi everyone,

Do you know a method or a class to find the difference between a Mbox, an EML, a MSG or a PST?
I know the difference between a mbox and an eml is insignificant. But they have two different rfc…

We can easily detect a PST file but for a ASCII/TXT file is more complicated.

Thx a lot!

@K4suus,

Can you please share source file so that we may further investigate to help you out.

You have two example below.
mails_example.zip (12.6 KB)

The only solution i found for now is file extension.

But if we look closely we can see the headers are different:

MBOX:
From nobody Mon Sep 17 00:00:00 2001
From: Junio C Hamano [junio@kernel.org](mailto:junio@kernel.org)
Date: Fri, 9 Jun 2006 00:44:16 -0700
Subject: re: [PATCH] another patch

EML:
EML:
Return-Path: mlemos@acm.org
To: Manuel Lemos mlemos@linux.local
Subject: Testing Manuel Lemos’ MIME E-mail composing and sending PHP class: HTML message
From: mlemos mlemos@acm.org
Reply-To: mlemos mlemos@acm.org
Sender: mlemos@acm.org
X-Mailer: http://www.phpclasses.org/mimemessage $Revision: 1.63 $ (mail)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=“652b8c4dcb00cdcdda1e16af36781caf”
Message-ID: 20050430192829.0489.mlemos@acm.org
Date: Sat, 30 Apr 2005 19:28:29 -0300

Do you have a solution to find the difference between this two type of file?

Regards

@kasuus,

I regret to inform that there is no such method which find difference between MBOX and EML files.