我编写了一个程序,C#
其中连接到 a并使用commandPOP Server
从服务器检索原始电子邮件消息字符串。由于程序检索的电子邮件是纯文本格式,所有标题和邮件正文都相同,因此很难从原始字符串中提取每个标题和邮件正文。POP3
RETR
谁能告诉我一个解决方案,通过它我可以将整个原始文本解析为一个System.Net.Mail.MailMessage
对象?
以下是示例电子邮件原始字符串:
+OK 1281 octets
Return-Path: <sample@test.in>
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"
<sample@test.in>
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: <20120922061146.2975C11554D@mailwash18.pair.com>
TEST Body
.