如何使用 libetpan 解析电子邮件?
How to parse an email with libetpan?
我将 libetpan 与 C 代码一起使用,并且我在 .eml 文件中有一封电子邮件(带有 2 个附件):
MIME-Version: 1.0
Received: by 10.76.171.68 with HTTP; Mon, 2 Feb 2015 06:35:10 -0800 (PST)
Bcc: e.chizat+3@klrvi.com
Date: Mon, 2 Feb 2015 15:35:10 +0100
Delivered-To: e.chizat@klervi.com
Message-ID: <CAE2Tr_-3a+VyD4rO0YYdHqrNrPk10oMcL2G4mDLa-sFJXykrdA@mail.gmail.com>
Subject: subject
From: email@email.com
To: email@email.com
Cc: email@email.com
Content-Type: multipart/mixed; boundary=047d7b41436a901ca8050e1bdc67
--047d7b41436a901ca8050e1bdc67
Content-Type: multipart/alternative; boundary=047d7b41436a901ca3050e1bdc65
--047d7b41436a901ca3050e1bdc65
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Some text
--047d7b41436a901ca3050e1bdc65
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div>Some text</div>
--047d7b41436a901ca3050e1bdc65--
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="accueil.png"
Content-Disposition: attachment; filename="accueil.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjma30
iVBORw0KGgoAAAANSUhEUgAAADoAAAA8CAIAAAC4gD5iAAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPCRUWvBfFbAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABJr
SURBVGje1VpfjCRHef/tXM35q6PHrjIzR9d553yNbx360BlmwU5uJSz5ECYYAdKZgIQjmcRCJEqk
OAqKUJ78YPGQtzzkAQKKUGIkYuE8YSmgHALEXuJDtxFLri325DpuJtfNbUOVdputL3t1qzz07Hrt
2/Otyf9Wa/ab2Z7u33z1+371fV/VzOgzX84zXVj3/+J15lNf+EZhHQAA7af/l+1Oi3rn/Zu2hxLR
5ymqsZ0fQguf91Gs2KwPRM5SWayU+fA/cf/X2jOjz3z5V/mtQ11YaxLkQzV/PEuNNgmBCJFLz37V
ld4zc1k7DnDMkshW7CIAyufMr+xjsRv7Pl+zVLKzf/ChfOFkns0aSgi7jrz9E8HM3nvnHTMzc+mc
nZRlzYvW5qkpqvA/wF3OUzoxkGc+dCo/lkHgNkeEb7yrnW88QABc462155bLIFRRc/vh/n18QLz9
0TzTteedX3BLu/bzR+hjp7InH3/UHB7wJo8vj8/94Ny3zn7r/D+dX/7R8uVXLvt13xXdhBJsgbcQ
Iwsheod6cTP6X9Rxi3sHSQ8G2RF145ceiPVazO8b3Oa5u+x9czfyQkZPfGD+1G+MuOGz3zn73PPP
2RWrBzo7lmXDjIh848N64MjZMFt430J+PN/xMkd2tbPWQkBKDXAIsJftuRV3oQLEfn18wLzno/vx
6w7WpR8uff7PPv+lv/7SYDD45Mc/+diHH5t/YL7f7/eSnr5Ta63pDirL8jvf/U55rTRvM13qxs2I
LUiS6KKuat6K8kA3HoC+Uyd34AY35b59vC/uzqc488iJ06
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="ajouter.png"
Content-Disposition: attachment; filename="ajouter.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjr0o1
iVBORw0KGgoAAAANSUhEUgAAAEEAAAAkCAIAAABZrMD7AAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPChkHeFQUywAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAN0
SURBVFjD7VgxaBtXGP5SNDyBhhN4uAMV+iABv4DBFyyIDjL4oEPOaLFpoDF06JUOcfHQmA6t6RCU
TE4DIvagolHOYBQPIeehoCXhEki4CxiqQANvaOAOKrg3CPyGGzqckGUlVmq7bSS4b/y5d//7/vf9
//vuzh0cHGDC8QkmHymHlEPK4RCZd0N3d33X54EYu3mlKVmrRO2r+lD83NBsvbvjN5/8Ps5VX7py
8eYX+igtuft8zJXz7g6HOYyhhD64w3QupRxSDmfm4NxZbt5amhgOVM17Ndur2etfGf0gDwUPo9Ol
zOeyK+VL+Vz2/+NgFikAIaQ5S/vBlerjta3W6VIuXmF2WVdy5D/0GkOwilRKNJ+07bJuMM1tBwC8
mi1jGDfqALSp7M1rJWOaSikdn9/fcWUMZOBt2aIrze8bABo/L7GCsvDjtjlDV8o6gOatRSGk+UPj
yPIXfGPXRYwkxcOnbXmAxXm2/mur5fNTcqBqnqpK6yVvveJ2WTeLNOEw+IL7qxZVFecl13LZ6/OM
AJUH7nEv5J0oFFKdIvVHPu9EADZuWKygbO76VFOuf84iKeuPvN6JXWYA2m+FkPL0WkqE1Nrn7T+j
npyOsmaf5qmq+G/C9VprpfpYxlicZyQzwikEUVcCcF5w5xlnNM8Kiv86bPzmVbZbMoal08ECfXPP
Wb7T9IYKd6JzsIoUgDlDL13QJKDmiME0dz8Y8JJK//6XMYSQ6hTJ57JB94gjOE772pQCQJ9W3S17
MNJDDO+P4Ez9kAgJgDl3WBtTp4McAiESVwyAZKAoBPGhpSGEJEmO7GwAoisB+G/CjZ33yE+evaeT
Q9jc9et7HgBC4P5iW3Ossn2Yr82j9luhn1crX5t5JUsycJ7z/vylqrLxrZnNZcnAQQSdiH2mrF0z
gr+iyo6bLF+4zHgoVIWEHdnm0b82W3vN4Ld7VZF49jokBAbTBh9bqzqtV9ycpaygPHzarmz3Zu7t
B27YkeYsRYz6nt9/fnPP56EoTavsgoYY31Ud5zm3ivSnL0sLRRbJExvn4W8gY7XxT5Z5NVtKGKv1
j/MJUV0+2f0wBGNGs4oMQNARk+qXWEGz5igPxe3jL4GP/09gNOp7XtLiqfdOOYzmQMi47zi5T0dx
WJ6/OOYcrBL9QE/bV3XRhbs/yf/50p5OOZwWfwPhHHSIAc2xrgAAAABJRU5ErkJggg==
--047d7b41436a901ca8050e1bdc67--
我的问题是,当我有条件地显示 mime->mm_data.mm_single->dt_data.dt_text.dt_data
(如果这个 mime 部分是 'plain/texte')时,我得到:
<div>Some text</div>
--047d7b41436a901ca3050e1bdc65--
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="accueil.png"
Content-Disposition: attachment; filename="accueil.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjma30
iVBORw0KGgoAAAANSUhEUgAAADoAAAA8CAIAAAC4gD5iAAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPCRUWvBfFbAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABJr
SURBVGje1VpfjCRHef/tXM35q6PHrjIzR9d553yNbx360BlmwU5uJSz5ECYYAdKZgIQjmcRCJEqk
OAqKUJ78YPGQtzzkAQKKUGIkYuE8YSmgHALEXuJDtxFLri325DpuJtfNbUOVdputL3t1qzz07Hrt
2/Otyf9Wa/ab2Z7u33z1+371fV/VzOgzX84zXVj3/+J15lNf+EZhHQAA7af/l+1Oi3rn/Zu2hxLR
5ymqsZ0fQguf91Gs2KwPRM5SWayU+fA/cf/X2jOjz3z5V/mtQ11YaxLkQzV/PEuNNgmBCJFLz37V
ld4zc1k7DnDMkshW7CIAyufMr+xjsRv7Pl+zVLKzf/ChfOFkns0aSgi7jrz9E8HM3nvnHTMzc+mc
nZRlzYvW5qkpqvA/wF3OUzoxkGc+dCo/lkHgNkeEb7yrnW88QABc462155bLIFRRc/vh/n18QLz9
0TzTteedX3BLu/bzR+hjp7InH3/UHB7wJo8vj8/94Ny3zn7r/D+dX/7R8uVXLvt13xXdhBJsgbcQ
Iwsheod6cTP6X9Rxi3sHSQ8G2RF145ceiPVazO8b3Oa5u+x9czfyQkZPfGD+1G+MuOGz3zn73PPP
2RWrBzo7lmXDjIh848N64MjZMFt430J+PN/xMkd2tbPWQkBKDXAIsJftuRV3oQLEfn18wLzno/vx
6w7WpR8uff7PPv+lv/7SYDD45Mc/+diHH5t/YL7f7/eSnr5Ta63pDirL8jvf/U55rTRvM13qxs2I
LUiS6KKuat6K8kA3HoC+Uyd34AY35b59vC/uzqc488iJ06
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="ajouter.png"
Content-Disposition: attachment; filename="ajouter.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjr0o1
iVBORw0KGgoAAAANSUhEUgAAAEEAAAAkCAIAAABZrMD7AAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPChkHeFQUywAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAN0
SURBVFjD7VgxaBtXGP5SNDyBhhN4uAMV+iABv4DBFyyIDjL4oEPOaLFpoDF06JUOcfHQmA6t6RCU
TE4DIvagolHOYBQPIeehoCXhEki4CxiqQANvaOAOKrg3CPyGGzqckGUlVmq7bSS4b/y5d//7/vf9
//vuzh0cHGDC8QkmHymHlEPK4RCZd0N3d33X54EYu3mlKVmrRO2r+lD83NBsvbvjN5/8Ps5VX7py
8eYX+igtuft8zJXz7g6HOYyhhD64w3QupRxSDmfm4NxZbt5amhgOVM17Ndur2etfGf0gDwUPo9Ol
zOeyK+VL+Vz2/+NgFikAIaQ5S/vBlerjta3W6VIuXmF2WVdy5D/0GkOwilRKNJ+07bJuMM1tBwC8
mi1jGDfqALSp7M1rJWOaSikdn9/fcWUMZOBt2aIrze8bABo/L7GCsvDjtjlDV8o6gOatRSGk+UPj
yPIXfGPXRYwkxcOnbXmAxXm2/mur5fNTcqBqnqpK6yVvveJ2WTeLNOEw+IL7qxZVFecl13LZ6/OM
AJUH7nEv5J0oFFKdIvVHPu9EADZuWKygbO76VFOuf84iKeuPvN6JXWYA2m+FkPL0WkqE1Nrn7T+j
npyOsmaf5qmq+G/C9VprpfpYxlicZyQzwikEUVcCcF5w5xlnNM8Kiv86bPzmVbZbMoal08ECfXPP
Wb7T9IYKd6JzsIoUgDlDL13QJKDmiME0dz8Y8JJK//6XMYSQ6hTJ57JB94gjOE772pQCQJ9W3S17
MNJDDO+P4Ez9kAgJgDl3WBtTp4McAiESVwyAZKAoBPGhpSGEJEmO7GwAoisB+G/CjZ33yE+evaeT
Q9jc9et7HgBC4P5iW3Ossn2Yr82j9luhn1crX5t5JUsycJ7z/vylqrLxrZnNZcnAQQSdiH2mrF0z
gr+iyo6bLF+4zHgoVIWEHdnm0b82W3vN4Ld7VZF49jokBAbTBh9bqzqtV9ycpaygPHzarmz3Zu7t
B27YkeYsRYz6nt9/fnPP56EoTavsgoYY31Ud5zm3ivSnL0sLRRbJExvn4W8gY7XxT5Z5NVtKGKv1
j/MJUV0+2f0wBGNGs4oMQNARk+qXWEGz5igPxe3jL4GP/09gNOp7XtLiqfdOOYzmQMi47zi5T0dx
WJ6/OOYcrBL9QE/bV3XRhbs/yf/50p5OOZwWfwPhHHSIAc2xrgAAAABJRU5ErkJggg==
--047d7b41436a901ca8050e1bdc67--
我怎样才能得到(或多或少的 Content-* 部分):
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div>Some text</div>
mime->mm_data.mm_single->dt_data.dt_text.dt_data
是我正文的开头。我必须使用 mime->mm_data.mm_single->dt_data.dt_text.dt_length
、我的文本长度来打印它。
我将 libetpan 与 C 代码一起使用,并且我在 .eml 文件中有一封电子邮件(带有 2 个附件):
MIME-Version: 1.0
Received: by 10.76.171.68 with HTTP; Mon, 2 Feb 2015 06:35:10 -0800 (PST)
Bcc: e.chizat+3@klrvi.com
Date: Mon, 2 Feb 2015 15:35:10 +0100
Delivered-To: e.chizat@klervi.com
Message-ID: <CAE2Tr_-3a+VyD4rO0YYdHqrNrPk10oMcL2G4mDLa-sFJXykrdA@mail.gmail.com>
Subject: subject
From: email@email.com
To: email@email.com
Cc: email@email.com
Content-Type: multipart/mixed; boundary=047d7b41436a901ca8050e1bdc67
--047d7b41436a901ca8050e1bdc67
Content-Type: multipart/alternative; boundary=047d7b41436a901ca3050e1bdc65
--047d7b41436a901ca3050e1bdc65
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Some text
--047d7b41436a901ca3050e1bdc65
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div>Some text</div>
--047d7b41436a901ca3050e1bdc65--
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="accueil.png"
Content-Disposition: attachment; filename="accueil.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjma30
iVBORw0KGgoAAAANSUhEUgAAADoAAAA8CAIAAAC4gD5iAAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPCRUWvBfFbAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABJr
SURBVGje1VpfjCRHef/tXM35q6PHrjIzR9d553yNbx360BlmwU5uJSz5ECYYAdKZgIQjmcRCJEqk
OAqKUJ78YPGQtzzkAQKKUGIkYuE8YSmgHALEXuJDtxFLri325DpuJtfNbUOVdputL3t1qzz07Hrt
2/Otyf9Wa/ab2Z7u33z1+371fV/VzOgzX84zXVj3/+J15lNf+EZhHQAA7af/l+1Oi3rn/Zu2hxLR
5ymqsZ0fQguf91Gs2KwPRM5SWayU+fA/cf/X2jOjz3z5V/mtQ11YaxLkQzV/PEuNNgmBCJFLz37V
ld4zc1k7DnDMkshW7CIAyufMr+xjsRv7Pl+zVLKzf/ChfOFkns0aSgi7jrz9E8HM3nvnHTMzc+mc
nZRlzYvW5qkpqvA/wF3OUzoxkGc+dCo/lkHgNkeEb7yrnW88QABc462155bLIFRRc/vh/n18QLz9
0TzTteedX3BLu/bzR+hjp7InH3/UHB7wJo8vj8/94Ny3zn7r/D+dX/7R8uVXLvt13xXdhBJsgbcQ
Iwsheod6cTP6X9Rxi3sHSQ8G2RF145ceiPVazO8b3Oa5u+x9czfyQkZPfGD+1G+MuOGz3zn73PPP
2RWrBzo7lmXDjIh848N64MjZMFt430J+PN/xMkd2tbPWQkBKDXAIsJftuRV3oQLEfn18wLzno/vx
6w7WpR8uff7PPv+lv/7SYDD45Mc/+diHH5t/YL7f7/eSnr5Ta63pDirL8jvf/U55rTRvM13qxs2I
LUiS6KKuat6K8kA3HoC+Uyd34AY35b59vC/uzqc488iJ06
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="ajouter.png"
Content-Disposition: attachment; filename="ajouter.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjr0o1
iVBORw0KGgoAAAANSUhEUgAAAEEAAAAkCAIAAABZrMD7AAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPChkHeFQUywAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAN0
SURBVFjD7VgxaBtXGP5SNDyBhhN4uAMV+iABv4DBFyyIDjL4oEPOaLFpoDF06JUOcfHQmA6t6RCU
TE4DIvagolHOYBQPIeehoCXhEki4CxiqQANvaOAOKrg3CPyGGzqckGUlVmq7bSS4b/y5d//7/vf9
//vuzh0cHGDC8QkmHymHlEPK4RCZd0N3d33X54EYu3mlKVmrRO2r+lD83NBsvbvjN5/8Ps5VX7py
8eYX+igtuft8zJXz7g6HOYyhhD64w3QupRxSDmfm4NxZbt5amhgOVM17Ndur2etfGf0gDwUPo9Ol
zOeyK+VL+Vz2/+NgFikAIaQ5S/vBlerjta3W6VIuXmF2WVdy5D/0GkOwilRKNJ+07bJuMM1tBwC8
mi1jGDfqALSp7M1rJWOaSikdn9/fcWUMZOBt2aIrze8bABo/L7GCsvDjtjlDV8o6gOatRSGk+UPj
yPIXfGPXRYwkxcOnbXmAxXm2/mur5fNTcqBqnqpK6yVvveJ2WTeLNOEw+IL7qxZVFecl13LZ6/OM
AJUH7nEv5J0oFFKdIvVHPu9EADZuWKygbO76VFOuf84iKeuPvN6JXWYA2m+FkPL0WkqE1Nrn7T+j
npyOsmaf5qmq+G/C9VprpfpYxlicZyQzwikEUVcCcF5w5xlnNM8Kiv86bPzmVbZbMoal08ECfXPP
Wb7T9IYKd6JzsIoUgDlDL13QJKDmiME0dz8Y8JJK//6XMYSQ6hTJ57JB94gjOE772pQCQJ9W3S17
MNJDDO+P4Ez9kAgJgDl3WBtTp4McAiESVwyAZKAoBPGhpSGEJEmO7GwAoisB+G/CjZ33yE+evaeT
Q9jc9et7HgBC4P5iW3Ossn2Yr82j9luhn1crX5t5JUsycJ7z/vylqrLxrZnNZcnAQQSdiH2mrF0z
gr+iyo6bLF+4zHgoVIWEHdnm0b82W3vN4Ld7VZF49jokBAbTBh9bqzqtV9ycpaygPHzarmz3Zu7t
B27YkeYsRYz6nt9/fnPP56EoTavsgoYY31Ud5zm3ivSnL0sLRRbJExvn4W8gY7XxT5Z5NVtKGKv1
j/MJUV0+2f0wBGNGs4oMQNARk+qXWEGz5igPxe3jL4GP/09gNOp7XtLiqfdOOYzmQMi47zi5T0dx
WJ6/OOYcrBL9QE/bV3XRhbs/yf/50p5OOZwWfwPhHHSIAc2xrgAAAABJRU5ErkJggg==
--047d7b41436a901ca8050e1bdc67--
我的问题是,当我有条件地显示 mime->mm_data.mm_single->dt_data.dt_text.dt_data
(如果这个 mime 部分是 'plain/texte')时,我得到:
<div>Some text</div>
--047d7b41436a901ca3050e1bdc65--
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="accueil.png"
Content-Disposition: attachment; filename="accueil.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjma30
iVBORw0KGgoAAAANSUhEUgAAADoAAAA8CAIAAAC4gD5iAAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPCRUWvBfFbAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABJr
SURBVGje1VpfjCRHef/tXM35q6PHrjIzR9d553yNbx360BlmwU5uJSz5ECYYAdKZgIQjmcRCJEqk
OAqKUJ78YPGQtzzkAQKKUGIkYuE8YSmgHALEXuJDtxFLri325DpuJtfNbUOVdputL3t1qzz07Hrt
2/Otyf9Wa/ab2Z7u33z1+371fV/VzOgzX84zXVj3/+J15lNf+EZhHQAA7af/l+1Oi3rn/Zu2hxLR
5ymqsZ0fQguf91Gs2KwPRM5SWayU+fA/cf/X2jOjz3z5V/mtQ11YaxLkQzV/PEuNNgmBCJFLz37V
ld4zc1k7DnDMkshW7CIAyufMr+xjsRv7Pl+zVLKzf/ChfOFkns0aSgi7jrz9E8HM3nvnHTMzc+mc
nZRlzYvW5qkpqvA/wF3OUzoxkGc+dCo/lkHgNkeEb7yrnW88QABc462155bLIFRRc/vh/n18QLz9
0TzTteedX3BLu/bzR+hjp7InH3/UHB7wJo8vj8/94Ny3zn7r/D+dX/7R8uVXLvt13xXdhBJsgbcQ
Iwsheod6cTP6X9Rxi3sHSQ8G2RF145ceiPVazO8b3Oa5u+x9czfyQkZPfGD+1G+MuOGz3zn73PPP
2RWrBzo7lmXDjIh848N64MjZMFt430J+PN/xMkd2tbPWQkBKDXAIsJftuRV3oQLEfn18wLzno/vx
6w7WpR8uff7PPv+lv/7SYDD45Mc/+diHH5t/YL7f7/eSnr5Ta63pDirL8jvf/U55rTRvM13qxs2I
LUiS6KKuat6K8kA3HoC+Uyd34AY35b59vC/uzqc488iJ06
--047d7b41436a901ca8050e1bdc67
Content-Type: image/png; name="ajouter.png"
Content-Disposition: attachment; filename="ajouter.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i5nyjr0o1
iVBORw0KGgoAAAANSUhEUgAAAEEAAAAkCAIAAABZrMD7AAAACXBIWXMAAAuJAAALiQE3ycutAAAA
B3RJTUUH3QoPChkHeFQUywAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAN0
SURBVFjD7VgxaBtXGP5SNDyBhhN4uAMV+iABv4DBFyyIDjL4oEPOaLFpoDF06JUOcfHQmA6t6RCU
TE4DIvagolHOYBQPIeehoCXhEki4CxiqQANvaOAOKrg3CPyGGzqckGUlVmq7bSS4b/y5d//7/vf9
//vuzh0cHGDC8QkmHymHlEPK4RCZd0N3d33X54EYu3mlKVmrRO2r+lD83NBsvbvjN5/8Ps5VX7py
8eYX+igtuft8zJXz7g6HOYyhhD64w3QupRxSDmfm4NxZbt5amhgOVM17Ndur2etfGf0gDwUPo9Ol
zOeyK+VL+Vz2/+NgFikAIaQ5S/vBlerjta3W6VIuXmF2WVdy5D/0GkOwilRKNJ+07bJuMM1tBwC8
mi1jGDfqALSp7M1rJWOaSikdn9/fcWUMZOBt2aIrze8bABo/L7GCsvDjtjlDV8o6gOatRSGk+UPj
yPIXfGPXRYwkxcOnbXmAxXm2/mur5fNTcqBqnqpK6yVvveJ2WTeLNOEw+IL7qxZVFecl13LZ6/OM
AJUH7nEv5J0oFFKdIvVHPu9EADZuWKygbO76VFOuf84iKeuPvN6JXWYA2m+FkPL0WkqE1Nrn7T+j
npyOsmaf5qmq+G/C9VprpfpYxlicZyQzwikEUVcCcF5w5xlnNM8Kiv86bPzmVbZbMoal08ECfXPP
Wb7T9IYKd6JzsIoUgDlDL13QJKDmiME0dz8Y8JJK//6XMYSQ6hTJ57JB94gjOE772pQCQJ9W3S17
MNJDDO+P4Ez9kAgJgDl3WBtTp4McAiESVwyAZKAoBPGhpSGEJEmO7GwAoisB+G/CjZ33yE+evaeT
Q9jc9et7HgBC4P5iW3Ossn2Yr82j9luhn1crX5t5JUsycJ7z/vylqrLxrZnNZcnAQQSdiH2mrF0z
gr+iyo6bLF+4zHgoVIWEHdnm0b82W3vN4Ld7VZF49jokBAbTBh9bqzqtV9ycpaygPHzarmz3Zu7t
B27YkeYsRYz6nt9/fnPP56EoTavsgoYY31Ud5zm3ivSnL0sLRRbJExvn4W8gY7XxT5Z5NVtKGKv1
j/MJUV0+2f0wBGNGs4oMQNARk+qXWEGz5igPxe3jL4GP/09gNOp7XtLiqfdOOYzmQMi47zi5T0dx
WJ6/OOYcrBL9QE/bV3XRhbs/yf/50p5OOZwWfwPhHHSIAc2xrgAAAABJRU5ErkJggg==
--047d7b41436a901ca8050e1bdc67--
我怎样才能得到(或多或少的 Content-* 部分):
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div>Some text</div>
mime->mm_data.mm_single->dt_data.dt_text.dt_data
是我正文的开头。我必须使用 mime->mm_data.mm_single->dt_data.dt_text.dt_length
、我的文本长度来打印它。