Did you know ... | Search Documentation: |
Pack mail_standards -- prolog/imf.pl |
This modules gives DCGs for using with the Internet Message Format(IMF) specified on the RFC 5322.
Line characters 998/78 limits specified on section 2.1.1 are not supported in this DCG implementation.
Section 4 corresponding for the obsolete syntax is currently unsupported.
MIME support is not provided, instead you can use mime_pack/3 from
library(http/mimepack)
(HTTP-support package) for creating a MIME message and
mime_parse/2 from the library(mime)
(C-library package).
For characters like WSP, CR, LF, etc. they are defined at Appendix B.1 at the RFC5234 ABNF specification.
Folding text like this and this
Each CRLF is translated into space:
Folding text like this and this
Example of message/2:
message( header([ field("From", "from@fromhost.com"), field("To", "to@tohost.com"), field("Subject","Subject part"), field("Date","Wed, 9 Dec 2015 17:27:50 -0300 (ART)")]), body("Hi world"))
The syntax is explained in section 3.3 of the IMF standard.