mail::mimestruct
describes the contents of a
MIME-formatted message.
A multipart MIME message has a single
mail::mimestruct
object that represents the
entire message, and series of
mail::mimestruct
objects, one object
for each
part of the multipart MIME section.
The additional
mail::mimestruct
objects are maintained by their
parent
mail::mimestruct
object, and are automatically
destroyed when the parent object is destroyed.
A
mail::mimestruct
contains the following
fields:
An opaque identifier of this MIME section.
Applications should handle this field as an opaque text string, which
is interpreted by
LibMAIL
.
A same message, for example,
may have different mime_id
fields if it comes from
an IMAP account, or a POP3 account.
The only exception to this rule is that the
mail::mimestruct
object that represents the entire
message will have an empty string in mime_id
.
The major MIME type, in uppercase.
The minor MIME subtype, in uppercase.
Additional attributes parsed from the Content-Type: MIME header. See below for more information.
The contents of the MIME Content-ID: header.
The contents of the MIME Content-Description: header.
The MIME encoding method.
The contents of the MIME Content-MD5: header.
The contents of the MIME Content-Language: header.
The MIME Content-Disposition: header, either "INLINE", or "ATTACHMENT" (or blank, if the header is not present).
The approximate size of the MIME section, in bytes (for non-multipart MIME sections only).
Approximate number of lines in a TEXT MIME section.
Additional attributes parsed from the Content-Disposition: MIME header. See below for more information.
mail::mimestruct
methodsReturns true if type
is
"MESSAGE" and subtype
is
"RFC822".
Returns true if type
is
"MESSAGE" and subtype
is
"RFC822".
Returns a
mail::envelope
object, if messagerfc822 returns true.
Returns the number of MIME sections in a multipart MIME message.
Returns a pointer to a mail::mimestruct
object that
represents a single part of a multipart MIME message.
childNum must be between zero and one less than
the number of parts returned by getNumChildren.
Returns a pointer to a mail::mimestruct
object that
represents the parent of this MIME part, if this
mail::mimestruct
object represents a single part of a multipart MIME message.
Returns NULL if this
mail::mimestruct
object represents the entire MIME message.
NOTE: |
|
mail::mimestruct::parameterList
A mail::mimestruct::parameterList
object holds
parsed MIME attributes in the
Content-Type: and
Content-Disposition: headers.
A mail::mimestruct::parameterList
object has the
following methods:
This method returns true if the attribute name exists.
Returns the value of attribute name (uppercase). If info is not NULL, the attribute's value is converted to the specified character set (if the attribute uses RFC 2231 to specify its character set and language).
Set the attribute name to value. If charset and/or language are not empty strings, name's character set and language are indicated accordingly, as per RFC 2231.
The begin and end functions return
the equivalent iterators over the individual name/value MIME attributes.
The iterators point to a std::pair<std::string,
std::string>
;
first
is the attribute name (uppercased),
and
second
is its value.
(The underlying structure being iterated is a
std::map<std::string,
std::string>
.)
<<< Previous | Home | Next >>> |
mail::envelope | Up | Simple Mail Access Protocol, Version 1 |