Next: Encoding and Decoding, Previous: Parsing Email, Up: guile-email [Index]
guile-email provides data types for representing emails and MIME entities.
This is the data type representing emails.
Predicate and field accessors for the <email>
data type.
Construct an <email>
object. headers is an association
list of email headers. body is either a string or a list of
<mime-entity>
objects.
This is the data type representing MIME entities.
Predicate and field accessors for the <mime-entity>
data type.
Construct a mime-entity object. headers is an association list of
MIME entity headers. body is either a string or a list of
<mime-entity>
objects.
The following descriptions of email headers are only a summary. Please see the relevant RFCs for more details.
An association list of key-value pairs (see (guile)Association Lists). Keys are the name of the email header, downcased and converted to symbols. Values are specific to the header and explained below.
An SRFI-19 date. See (guile)SRFI-19 Date.
An association list of atmost two keys - ’name’ and ’address’. The values corresponding to these keys are explained below.
name
Display name of the email address. When the email address does not specifiy a display name, this key will be absent.
address
Actual email address.
A list of addresses, each of type ’Address’.
A string containing an email message ID with the surrounding angle brackets (‘<’ and ‘>’) removed. Email message IDs uniquely identify the email.
A list of message IDs, each of type MessageID
.
The date the email was sent on, as specified in the Date header.
The list of authors of the email, as specified in the From header.
The sender of the email, as specified in the Sender header.
The list of addresses the author of the email suggests replies be sent to, as specified in the Reply-To header.
The list of primary recipients of the email, as specified in the To header.
The list of other recipients of the email at whom the content of the email may not be directed, as specified in the Cc header.
THe list of recipients whose address is not to be revealed to other recipients of the email, as specified in the Bcc header.
The message ID of the email, as specified in the Message-ID header.
The list of message IDs of emails to which this email is a reply, as specified in the In-Reply-To header.
The list of message IDs specified in the References header.
A string identifying the topic of the email, as specified in the Subject header.
A string containing additional comments on the body of the email, as specified in the Comments header.
A list of strings each an important word or phrase, as specified in the Keywords header.
The date at which the resent message was dispatched by the resender, as specified in the Resent-Date header.
The list of addresses specified in the Resent-From header.
The address specified in the Resent-Sender header.
The list of addresses specified in the Resent-To header.
The list of addresses specified in the Resent-Cc header.
The list of addresses specified in the Resent-Bcc header.
The message ID specified in the Resent-Message-ID header.
The MIME version specified in the MIME-Version header.
The MIME type of the body, as specified in the Content-Type header, as an association list. The following keys always exist in the association list. Any additional parameters will also be listed as key-value pairs. Keys are names of the parameters, downcased and converted to symbols.
type
The primary type
subtype
The secondary type
charset
The charset
If no Content-Type header is present, a type of text
, a subtype
of plain
and a charset of “utf-8” is assumed as the default.
That is, the following:
((type . text) (subtype . plain) (charset . "utf-8"))
The content disposition type, as specified in the Content-Disposition header, as an association list. The following keys always exist in the association list.
type
inline
attachment
Other optional keys include
filename
creation-date
modification-date
read-date
size
Any additional parameters will also be listed as key-value pairs. Keys are names of the parameters, downcased and converted to symbols.
The encoding of the body of the email as specified in the Content-Transfer-Encoding header. This can be one of the following symbols.
7bit
The message is 7-bit encoded. This is the default if no Content-Transfer-Encoding header is present.
8bit
The message is 8-bit encoded.
quoted-printable
The message is encoded using Quoted-Printable encoding.
base64
The message is encoded using Base64 encoding.
Note that guile-email automatically decodes the email. The user need
not read the content-transfer-encoding
and invoke the appropriate
decoding procedure. The content-transfer-encoding
header is only
provided for the sake of completion.
Next: Encoding and Decoding, Previous: Parsing Email, Up: guile-email [Index]