![]() |
Home | ![]() |
The QMailMessage class provides a convenient interface for working with messages. More...
#include <QMailMessage>
This class is under development and is subject to change.
Inherits QMailMessageMetaData, QMailMessagePartContainer, and QMailMessageFwd.
QMailMessage () | |
QMailMessage ( const QMailMessageId & id ) | |
QMailMessage ( const QString & uid, const QMailAccountId & accountId ) | |
virtual QList<QMailAddress> | bcc () const |
virtual QList<QMailAddress> | cc () const |
bool | contains ( const QMailMessagePart::Location & location ) const |
virtual uint | contentSize () const |
virtual QString | externalLocationReference () const |
virtual bool | hasRecipients () const |
virtual QString | inReplyTo () const |
const QMailMessagePart & | partAt ( const QMailMessagePart::Location & location ) const |
QMailMessagePart & | partAt ( const QMailMessagePart::Location & location ) |
virtual QList<QMailAddress> | recipients () const |
virtual QMailAddress | replyTo () const |
virtual void | setBcc ( const QList<QMailAddress> & bccList ) |
virtual void | setCc ( const QList<QMailAddress> & ccList ) |
virtual void | setContentSize ( uint size ) |
virtual void | setExternalLocationReference ( const QString & location ) |
virtual void | setInReplyTo ( const QString & messageId ) |
virtual void | setReplyTo ( const QMailAddress & address ) |
QByteArray | toRfc2822 ( EncodingFormat format = TransmissionFormat ) const |
void | toRfc2822 ( QDataStream & out, EncodingFormat format = TransmissionFormat ) const |
QList<QMailMessage::MessageChunk> | toRfc2822Chunks ( EncodingFormat format = TransmissionFormat ) const |
virtual void | appendHeaderField ( const QString & id, const QString & value ) |
virtual void | appendHeaderField ( const QMailMessageHeaderField & field ) |
virtual bool | contentAvailable () const |
virtual uint | indicativeSize () const |
virtual bool | partialContentAvailable () const |
virtual void | removeHeaderField ( const QString & id ) |
virtual void | setDate ( const QMailTimeStamp & timeStamp ) |
virtual void | setFrom ( const QMailAddress & from ) |
virtual void | setHeaderField ( const QString & id, const QString & value ) |
virtual void | setHeaderField ( const QMailMessageHeaderField & field ) |
virtual void | setId ( const QMailMessageId & id ) |
virtual void | setSubject ( const QString & subject ) |
virtual void | setTo ( const QList<QMailAddress> & toList ) |
virtual void | setTo ( const QMailAddress & address ) |
QMailMessage | fromRfc2822 ( const QByteArray & byteArray ) |
QMailMessage | fromRfc2822File ( const QString & fileName ) |
The QMailMessage class provides a convenient interface for working with messages.
QMailMessage supports a number of types. These include telephony types such as SMS and MMS, and Internet email messages as defined in RFC 2822 (Internet Message Format), and RFC 2045 (Format of Internet Message Bodies) through RFC 2049 (Conformance Criteria and Examples).
The most common way to use QMailMessage is to initialize it from raw data using QMailMessage::fromRfc2822().
A QMailMessage can also be constructed piece by piece using functions such as setMessageType(), setFrom(), setTo(), setSubject(), and setBody() or appendPart(). Convenience functions such as from()/setFrom() and date()/setDate() accept and return wrapper types, to simplify the exchange of correctly-formatted data. In some cases, however, it may be simpler for clients to get and set the content of header fields directly, using the headerField() and setHeaderField() functions inherited from QMailMessagePartContainer.
Messages can be added to the QMailStore, or retrieved from the store via their QMailMessageId identifier. The QMailMessage object also provides access to any relevant meta data describing the message, using the functions inherited from QMailMessageMetaData.
A message may be serialized to a QDataStream, or returned as a QByteArray using toRfc2822().
See also QMailMessageMetaData, QMailMessagePart, QMailMessageBody, QMailStore, and QMailMessageId.
Constructs an empty message object.
Constructs a message object from data stored in the message store with QMailMessageId id.
Constructs a message object from data stored in the message store with the unique identifier uid from the account with id accountId.
Reimplemented from QMailMessagePartContainer::appendHeaderField().
Reimplemented from QMailMessagePartContainer::appendHeaderField().
Returns a list of all the bcc (blind carbon copy) recipients specified for the message.
See also setBcc(), to(), cc(), and QMailAddress.
Returns a list of all the cc (carbon copy) recipients specified for the message.
See also setCc(), to(), bcc(), and QMailAddress.
Returns true if the message contains a part with the location location.
Reimplemented from QMailMessageMetaData::contentAvailable().
Returns the size of the message content excluding any meta data, in bytes.
See also setContentSize().
Returns a value by which the external location of the message can be referenced, if available.
See also setExternalLocationReference().
Constructs a mail message from the RFC 2822 data contained in byteArray.
Constructs a mail message from the RFC 2822 data contained in the file fileName.
Returns true if there are any recipients (either To, CC or BCC addresses) defined for this message; otherwise returns false.
Returns the message ID specified by the RFC 2822 'In-Reply-To' field for the message, if present.
See also setInReplyTo().
Reimplemented from QMailMessageMetaData::indicativeSize().
Returns a const reference to the part at the location location within the message.
Returns a non-const reference to the part at the location location within the message.
Reimplemented from QMailMessageMetaData::partialContentAvailable().
Returns a list of all the recipients specified for the message, either as To, CC, or BCC addresses.
See also to(), cc(), bcc(), and hasRecipients().
Reimplemented from QMailMessagePartContainer::removeHeaderField().
Returns the address specified by the RFC 2822 'Reply-To' field for the message, if present.
See also setReplyTo().
Set the list of bcc (blind carbon copy) recipients for the message to bccList.
See also bcc(), setTo(), and setCc().
Set the list of cc (carbon copy) recipients for the message to ccList.
See also setTo() and setBcc().
Sets the size of the message content excluding any meta data to size, in bytes.
See also contentSize().
Reimplemented from QMailMessageMetaData::setDate().
Returns the value by which the external location of the message can be referenced to location.
See also externalLocationReference().
Reimplemented from QMailMessageMetaData::setFrom().
Reimplemented from QMailMessagePartContainer::setHeaderField().
Reimplemented from QMailMessagePartContainer::setHeaderField().
Reimplemented from QMailMessageMetaData::setId().
Sets the RFC 2822 'In-Reply-To' field for the message to messageId.
See also inReplyTo().
Sets the RFC 2822 'Reply-To' address of the message to address.
See also replyTo().
Reimplemented from QMailMessageMetaData::setSubject().
Reimplemented from QMailMessageMetaData::setTo().
Reimplemented from QMailMessageMetaData::setTo().
Returns the message in RFC 2822 format. The encoded content will vary depending on the value of format.
Writes the message to the output stream out, in RFC 2822 format. The encoded content will vary depending on the value of format.
Returns the message in RFC 2822 format, separated into chunks that can be individually transferred by a mechanism such as that defined by RFC 3030. The encoded content will vary depending on the value of format.
Copyright © 2010 QtSoftware | Messaging Framework |