3

我想解析一个包含 IMAP 响应的 NSDATA,例如

Date: Tue, 18 Sep 2012 02:50:54 +0000 (GMT)
From: xx@xx.com
To: yy@yy.com
Message-ID: 7034025
Content-Type: multipart/mixed; 
    boundary="----=_Part_16_9157073.1347936657899"
Message-Source: IMAP

------=_Part_16_9157073.1347936657899
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: text.txt
Content-Location: text.txt
X-Section-ID: Text-Section

Test Message
------=_Part_16_9157073.1347936657899
Content-Type: image/jpeg
Content-Transfer-Encoding: binary
Content-ID: attachment_1
Content-Location: image_1347936646.jpg
X-Section-ID: Thumbnail-Section

ˇÿˇ‡ ...........

------=_Part_16_9157073.1347936657899--

从这里我想提取两个部分(文本和图像)。任何人都可以建议我一个 Objective-c mime 解析器。

注意:图像部分为二进制,未使用 base64 编码。

4

0 回答 0