我最近在做一个邮件接收的程序的毕业设计,现在有个问题始终不知道怎么去处理.希望大家能帮帮忙看看,给点建议.
下面是一封邮件的原码,纯文本的我知道怎么去处理.但是带有附件的应该怎么把附件部分接收下来存储呢?
下面是个带有附件的原码.
+OK 65413 octets
Received: from 192.168.208.59 ( 192.168.208.59 [192.168.208.59] ) by
ajax-webmail-wmsvr31 (Coremail) ; Sun, 22 Apr 2007 10:54:56 +0800 (CST)
Date: Sun, 22 Apr 2007 10:54:56 +0800 (CST)
From: =?GBK?B?0NC35w==?= <yuwencai521@163.com>
To: woshiwuidi1982@163.com
Message-ID: <12302532.765801177210496171.JavaMail.root@bj163app31.163.com>
Subject: =?gbk?B?uL28/g==?=
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_77591_30404756.1177210496171"
X-Originating-IP: [192.168.208.59]
X-Priority: 3
X-Mailer: Coremail Webmail Server Version ${coremail.version} build
070313(3236.1034.1035) Copyright (c) 2002-2007 www.mailtech.cn 163com
------=_Part_77591_30404756.1177210496171
Content-Type: multipart/Alternative;
boundary="----=_Part_77590_31883211.1177210496171"
------=_Part_77590_31883211.1177210496171
Content-Type: text/plain; charset=gbk
Content-Transfer-Encoding: base64
uL28/r3iwusuICAg
------=_Part_77590_31883211.1177210496171
Content-Type: text/html; charset=gbk
Content-Transfer-Encoding: quoted-printable
<DIV>=B8=BD=BC=FE=BD=E2=C2=EB.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV><br><!-- footer --><br>
<hr>
<a style=3D"font-size:14px;line-height:15px; color:#000; text-decoration:no=
ne" href=3D"http://www.188.com/188compare.htm" target=3D"_blank"><span styl=
e=3D"text-decoration:underline; color:blue">=CE=EF=B3=AC=CB=F9=D6=B5=B5=C4=
=D1=A1=D4=F1=A3=AC=C4=E3=B9=BB=BE=AB=C3=F7=C2=F0=A3=BF</span><span style=3D=
"font-family:Tahoma; text-decoration:underline; color:blue">>></span> </a>
------=_Part_77590_31883211.1177210496171--
------=_Part_77591_30404756.1177210496171
Content-Type: application/octet-stream; name="email.rar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="email.rar"
.....
//以下是附件部分的原码太长省了.
------=_Part_77591_30404756.1177210496171--
.