高分求解: 怎樣分解SMTP,POP3郵件數據包內容?

yimten968 2007-02-02 02:20:11
怎樣分解SMTP,POP3郵件數據包內容? 提取:發件人,收件人,主題,附件,正文等信息
由於帶附件的數據包過長,有需要的請給郵箱,謝謝!

smtp 截取的數據包:

EHLO yimten

AUTH LOGIN

eNltdPQu

MAIzCd4vOKc=

MAIL FROM: <yimten@163.com>

RCPT TO: <betty0029@163.com>

DATA

Message-ID: <00b601c745e2$eba6a180$9b01010a@FUHUA.COM>
Reply-To: <yimten@163.com>
From: <yimten@163.com>
To: <betty0029@163.com>
Subject: =?big5?B?pUTDRA==?=
Date: Thu, 1 Feb 2007 17:25:31 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00B1_01C74625.F978DB50"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

This is a multi-part message in MIME format.

------=_NextPart_000_00B1_01C74625.F978DB50
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable

=A5=BF=A4=E5

------=_NextPart_000_00B1_01C74625.F978DB50
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>=A5=BF=A4=E5</FONT></DIV></BODY></HTML>

------=_NextPart_000_00B1_01C74625.F978DB50--

.

QUIT


...全文
396 点赞 收藏 4
写回复
4 条回复
withcsharp 2007年02月13日
搜 Mail2000.pas
回复 点赞
sdzeng 2007年02月13日
去看一下《Delphi网络通信协议分析与应用实现》第6章
回复 点赞
yimten968 2007年02月02日
聽說用 TIdMessageDecoderMIME 可以實現,但不知要怎麼用?
回复 点赞
yimten968 2007年02月02日
pop 截取的數據包:
+OK Welcome to coremail Mail Pop3 Server (163com[20050206])

+OK core mail

+OK 1 message(s) [1722 byte(s)]

+OK 1 1722

+OK 1 1722
1 1722
.

+OK 1722 octets

Received: from yimten (unknown [256.133.231.154])
by smtp4 (Coremail) with SMTP id wKjRDrC78Ae31cJF0padAw==.8941S2;
Fri, 02 Feb 2007 14:10:00 +0800 (CST)
Message-ID: <00c101c74691$076b1910$9b01010a@FUHUA.COM>
Reply-To: <yimten@163.com>
From: <yimten@163.com>
To: <yimten@163.com>
Subject: aaa
Date: Fri, 2 Feb 2007 14:11:50 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00BE_01C746D4.15041A70"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Coremail-Antispam: 1U3Yxn0WfASr-VFAUDIcSsGvfJTk4kE6xkIj40Ew7xC0wAv7V
C2z280aVAFwI0_Cr0_Gr1UMIIF0xvEx4A2jsIE14v26r1j6r4UMx02cVAKzwCI42IY6I8E
87Iv6xkF7I0E14v26r4j6r4UJwCI42IY6xIIjxv20xvE14v26r1j6r1xMxCjnVAqn7xvrw
Av7VC0I7IYx2IY67AKxVWUXVWUAwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lc2xS
Y4AK67AK6r47M7AC8VAFwI0_Jr0_Gr1lb4IE77IF4wAFIxvE14AKwVWUJVWUGwAYjsxI4V
W7JjkaLaAFLSUrUUUUUjvjm3AaLaJ3UjIFyTuYvjxUY2NtDUUUUUAaLaJ3U

This is a multi-part message in MIME format.

------=_NextPart_000_00BE_01C746D4.15041A70
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable

aaaaa

------=_NextPart_000_00BE_01C746D4.15041A70
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>aaaaa</FONT></DIV></BODY></HTML>

------=_NextPart_000_00BE_01C746D4.15041A70--


.

+OK core mail

+OK core mail
回复 点赞
发动态
发帖子
网络通信/分布式开发
创建于2007-08-02

925

社区成员

3.3w+

社区内容

Delphi 网络通信/分布式开发
社区公告
暂无公告