I have written a program
in C# which connects to a POP Server
and retrieves raw email message strings from
the server using POP3 command RETR.
Since
the email message being retrieved by
the program
is in plain text format with all
the headers
and message body with
in the same, its too difficult to extract each header
and mail body from
the raw
string.
Could anybody tell me a solution by which I can parse
the entire raw text to a System.Net.Mail.MailMessage object?
Following
is a sample email raw string:
+OK 1281 octets
Return-Path: <
[email protected]>
Delivered-To: samplenet-sample:in-sample2@test.
in
X-Envelope-To: sample2@test.
in
Received: (qmail 53856 invoked from network); 22 Sep 2012 06:11:46 -0000
Received: from mailwash18.pair.com (66.39.2.18)
MIME-Version: 1.0
From: "Deepu"
<
[email protected]>
To: sample2@test.
in
Date: 22 Sep 2012 11:41:39 +0530
Subject: TEST Subject
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: <
[email protected]>
TEST Body
.