looking for MIME header parsing library?
843834Sep 21 2008 — edited Sep 21 2008are there any libraries available for parsing MIME headers? I have a need to parse some samples below (including headers that are formatted multi-lines with CRLF between tokens). Additionally, ability intelligently parse out the various parameters following the primary/subtype of the header.
I have looked into jigsaw.jar, java mails ..
thanks in advance.
examples:
Content-Type: text/html; charset="iso-8859-1"
Content-Type: multipart/alternative; boundary="92154348-1221851409=:30935"
Received: from smtp01 ([x.x.2.3]) by mail.server.com with Microsoft SMTPSVC(5.0.111.6713);\nFri, 19 Sep 2008 12:10:10 -0700
X-OriginalArrivalTime: 19 Sep 2008 19:10:10.0650 (UTC) FILETIME=[563EC3A0:01C91A8B]
Content-Type: multipart/related;\n boundary="----=_NextPart_32252.1057009685.31.001";\n type="multipart/alternative"
Content-Description: Message in alternative text and HTML forms
Date: Fri, 19 Sep 2008 12:10:09 -0700 (PDT)
Received: from [124.23.104.147] by mail.re2.com via HTTP; Fri, 19 Sep 2008 12:10:09 PDT
Received: (qmail 33458 invoked by uid 60001); 19 Sep 2008 19:10:09 -0000
Message-ID: <344545.3091135.qm@web51104.mail.re2.google.com>
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;\n s=s1024; d=yahoo.com;\n h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID;\n b=TpAqzxLlNf+9pDl+IKjFzfNbtlDqGUw47gvoWvChvYhLhe7/vMmkJPERhpNFQZL8dYEJef4dv7ET0/XkyCEkd2huTgh6XIRGM9bwH30=;
X-Brightmail-Tracker: AAAAAA==
content-type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data