目前在用C#写一个收POP3服务器上邮件的小程序
用RETR命令获取邮件的全部文本后,发现正文内容为乱码,不知如何转换成中文内容
下图为邮件文本另存为.eml后用outlook打开所呈现的
下面的内容是邮件的全部文本
+OK
Received: from ptr-smtp-01.ptr.petrochina ([10.27.132.76]) by XN-MAIL-01.ptr.petrochina with Microsoft SMTPSVC(6.0.3790.4675);
Wed, 13 Aug 2014 16:07:14 +0800
Received: from mx1.cnpc.com.cn ([10.27.132.110]) by ptr-smtp-01.ptr.petrochina with Microsoft SMTPSVC(6.0.3790.4675);
Wed, 13 Aug 2014 16:07:13 +0800
X-AuditID: 0a1b846e-b7fd06d000000ecd-ff-53eb1cb1e402
Received: from smtpbg334.qq.com (smtpbg334.qq.com [14.17.43.229])
by mx1.cnpc.com.cn (cnpc mail system) with SMTP id 6B.7B.03789.1BC1BE35; Wed, 13 Aug 2014 16:07:13 +0800 (HKT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201307;
t=1407917233; bh=BtSFFp/vWU1EFIKVKndgjUkj16t70OLpso48T1gkQj8=;
h=X-QQ-FEAT:X-QQ-SSF:X-HAS-ATTACH:X-QQ-BUSINESS-ORIGIN:
X-Originating-IP:X-QQ-STYLE:X-QQ-mid:From:To:Subject:Mime-Version:Content-Type:Content-Transfer-Encoding:Date:
X-Priority:Message-ID:X-QQ-MIME:X-Mailer:X-QQ-Mailer:
X-QQ-SENDSIZE;
b=aheMA3y/Wof9nu8vFjagzzVxIT0arPGsJQfCVzed+RpU0SGWnbuP8aNy64Dgr136t
EyHrv7+adVH+CXX9e2K71jDvt87hLe3xDfkl5hK9LoBEuGer4IC7al9OWAdNylbQfx
AYwgksoVd9309S3r/UoqQyeSUIB9ZRoC1ikyQ8MM=
X-QQ-FEAT: zaIfg0hwV2rILZvaZFWuYz4JaX99GOX45n7TdnPKc9w=
X-QQ-SSF: 00010000000000F000000000000000Z
X-HAS-ATTACH: no
X-QQ-BUSINESS-ORIGIN: 2
X-Originating-IP: 218.70.88.180
X-QQ-STYLE:
X-QQ-mid: webmail419t1407917232t7438895
From: “=?gb18030?B?bmV2ZXI=?=” <29995136@qq.com>
To: “=?gb18030?B?Y2hlbnNoYWxpbg==?=” <chenshalin@petrochina.com.cn>
Subject: =?gb18030?B?0ru12NTa0qq5pA==?=
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary=”—-=_NextPart_53EB1CB0_0911E318_0BCA4BD4″
Content-Transfer-Encoding: 8Bit
Date: Wed, 13 Aug 2014 16:07:12 +0800
X-Priority: 3
Message-ID: <tencent_4D1998E81D9B2717091808B2@qq.com>
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
X-QQ-SENDSIZE: 520
X-Brightmail-Tracker: H4sIAAAAAAAAA11Uf1AUZRjmuz1ggft02YPj5QCDKyaUmPBH5WjjMDY4/dOMM5f9YTW4wMpd
HAdze4fQNA0BKeAgJUhyCKmDEwmGwA1dI2od03BiICBTCklJQghlKqGAObXf3R4s/ffM87z7
Pu/zvt8sTbHFIVqaL7DyFjNn0gUEK9eEJk4mtUfP6pOHOxK2OuvnFSno9fKKL9FutDf41Uze
ZMznLS/u2BdsaOrpUuTVUgWV926iIjSpqEBBNDBb4MynRUov1sDgeFsAwSzTgeBKWyTBSuaC
Ej47keCteQWOjTX7e/F6KHFcoLyYAfdQndQzAk733kJe/Ax0NtsDvVgF3xy5L3rRIn4epoo0
hA5gkuFc0wPPCGHMa9A4uoRIiVos6XWnEYiZUHjqVBNIMW/DL12eYkrsXV11h/LOGA/Vji7J
B8PxQ5OeGsy8BN/VHpPyxcLFgRoJh0HL1PnleR//1Sp9y8JIWTP6BIF9xdi+YmyXGXtxEszO
/RHoxXFQc/i2hF8A99NBJOdPosCzaG2GOS8jScjgzGbekpS8sQOJRwyOKjU70fCZ7S7E0Ein
wtPPzehZfy5fKMxxoWxaoQvHwwsitSY9N7PQwAmGNIvNxAu6MHxqq0jjZTrdZsrWafG1qFk9
q15mzfwBwcRbxVejW4d37p/WsxHLmmAT8owZxlybkGazmFwIaEpsm+IgbTO5wvd5S67XzIWi
aKUuArc4b+pZJouz8tk8n8dbfKqCDnShEnFVzNjReTvSKs25Zl4HeAeZJdTCZ/EF+40mq+8D
sVMgKyqMXPGMH4M/+FN018gFWYI4XEoSaOXy/0Mo6CAXyqJVYpJsYo+FPC5HMGZJ1mqcfEN0
UPlYj20kdoJYyvpImWUMTiCWGp+02q4PfYzo05fvHlawnszaCKwkpgwpN9jMy5G1Grxne5ee
XSsTiLU2Gm97z61nw2X8irs2FicTNVKmrh7A9x8YRjFaNUZ+fn6sSjxMjtEq5ZX0GTSKxOel
xg4ynspotq6shMXdJH2IRHo2AvhuJLmdxMkWEo2LGVEJl5TV42yy0YhRw/SThhzoqGrvR1Az
fHZAAW2XK24pYLytr46CxuKx3yhwdo+cV0J36cRP/nCtzDVDQ/uVpfog+P7GWFcQtPy41BcC
tx93/h4Ch6qfPAyB/qm6ShU86ilrV4HzUmc5hokfqr7A8G3d9X48Ix5cIR68M5U8XcHKWeUH
/yjVc3CJlQ5eSkjWR646+EEiaXzS6oDaIpTuXNi9beDrq7F+8c86hubu+Bkrm3Y23Dtq+PD4
kfLE+F9b331QtqtnIbFkZDR183VLbMGjl9/8p696z/2/NVPFlx5upuuDL7qHUk4ONqhKHVO9
+z43nes4cFXTuLguzp2vGv95fmTD9BzFMYtMUu/cW62j79T+u2txy4m9E28cPPXVprL1OqVg
4DZuoCwC9x814rgBFQYAAA==
Return-Path: 29995136@qq.com
X-OriginalArrivalTime: 13 Aug 2014 08:07:13.0418 (UTC) FILETIME=[96F456A0:01CFB6CD]
This is a multi-part message in MIME format.
——=_NextPart_53EB1CB0_0911E318_0BCA4BD4
Content-Type: text/plain;
charset=”gb18030″
Content-Transfer-Encoding: base64
yc/Kx9bQufrNrA==
——=_NextPart_53EB1CB0_0911E318_0BCA4BD4
Content-Type: text/html;
charset=”gb18030″
Content-Transfer-Encoding: base64
PERJVj7Jz8rH1tC5+s2sPC9ESVY+
——=_NextPart_53EB1CB0_0911E318_0BCA4BD4–
请高要指点一下怎么才能从这些乱码把邮件的正文转化为正确的中文?