You are looking at historical revision 17217 of this page. It may differ significantly from its current revision.
internet-message
Description
internet-message is a collection of parser combinators for the grammar defined in RFC 5322 (Internet Message Format).
Library Procedures
The combinator procedures in this library are based on the interface provided by the abnf library.
[procedure] fieldsThis parser will parse an arbitrary number of header fields as defined in the RFC. For each field, an appropriate alist is created. The following fields are recognized:
- from
- sender
- return-path
- reply-to
- to
- cc
- bcc
- message-id
- in-reply-to
- references
- subject
- comments
- keywords
- orig-date
- resent-date
- resent-from
- resent-sender
- resent-to
- resent-cc
- resent-bcc
- resent-msg-id
- resent-reply-to
- received
- optional-field
This parser will parse a message body as specified by the RFC; that is, any number of text characters, which may be divided into separate lines by CRLF.
[procedure] messageThis parser will parse a complete message as defined by the RFC and it broken down into the separate header fields and the message body.
[procedure] commentThis parser parses comment text, as defined by the RFC. Comments may nest.
Requires
Version History
- 2.0 Extensions to the header function and many bugfixes
- 1.3 Update to reflect changes in lexgen
- 1.1 Fix in date parsing
- 1.0 Initial release
License
Based on the Haskell Rfc2822 module by Peter Simons.
Copyright 2009-2010 Ivan Raikov and the Okinawa Institute of Science and Technology. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.