I'm trying to parse a text file which contains a load of emails, unfortunately, these emails are in the same kind of format that you get when you view the full source.
I can get out the To, From, Subject and Date just fine, and then by getting everything that comes below the "Date: ..." line I can get the main "body" of the message.
However, this body often (normally) contains a load of mail headers that I don't want,
they range from
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <junkjunkjunk@hotmail.com>
X-OriginalArrivalTime: 28 Oct 2002 15:51:44.0462 (UTC) FILETIME=[junk]
to
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-Spam-Status: No, hits=1.5 required=5.0
tests=INVALID_MSGID,SPAM_PHRASE_00_01,USER_AGENT_OE
version=2.41
X-Spam-Level: *
to
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0005_01C27EA1.717199E0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C27EA1.717199E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
As they seem to change in almost every single email, I can't see any way or removing them...
Yet, all webmail programs (and things like OE, MS Outlook) can remove them without any problems.
Does anyone know of a way to remove the headers from the emails?
Thanks for any help.