PR_MESSAGE_FLAGS
The
PR_MESSAGE_FLAGS property contains a bitmask of flags indicating the current
state of a message.
Quick Info
Header
file: |
MAPITAGS.H |
Must be
exposed by: |
Message
objects |
Identifier: |
0x0E07 |
Property
type: |
PT_LONG |
Property
tag: |
0x0E070003 |
Remarks
The
PR_MESSAGE_FLAGS property is a nontransmittable message property exposed at
both the sending and receiving ends of a transmission, with different values
depending upon the client application or store provider involved. This property
is initialized by the client or message store provider when a message is
created and saved for the first time and then updated periodically by the
message store provider, a transport provider, and the MAPI spooler as the
message is processed and its state changes.
PR_MESSAGE_FLAGS
exists on a message both before and after submission, and on all copies of the
received message. Although it is not a recipient property, it is exposed
differently to each recipient according to whether it has been read or modified
by that recipient.
One or more
of the following flags can be set for PR_MESSAGE_FLAGS:
MSGFLAG_ASSOCIATED
The message
is an associated message of a folder. The client or provider has read-only access
to this flag.
MSGFLAG_FROMME
The messaging
user sending was the messaging user receiving the message. The client or
provider has read/write access to this flag until the first IMAPIProp::SaveChanges
MSGFLAG_HASATTACH
The message
has at least one attachment. This flag corresponds to the message s
PR_HASATTACH property. The client has read-only access to this flag.
MSGFLAG_NRN_PENDING
A nonread
report needs to be sent for the message. The client or provider has read-only
access to this flag.
MSGFLAG_READ
The message
is marked as having been read. This can occur as the result of a call at any
time to IMessage::SetReadFlag
MSGFLAG_RESEND
The message
includes a request for a resend operation with a nondelivery report. The client
or provider has read/write access to this flag until the first IMAPIProp::SaveChanges
MSGFLAG_RN_PENDING
A read report
needs to be sent for the message. The client or provider has read-only access
to this flag.
MSGFLAG_SUBMIT
The message
is marked for sending as a result of a call to IMessage::SubmitMessage
MSGFLAG_UNMODIFIED
The outgoing
message has not been modified since the first time that it was saved; the
incoming message has not been modified since it was delivered.
MSGFLAG_UNSENT
The message
is still being composed. It is saved, but has not been sent. The client or
provider has read/write access to this flag until the first IMAPIProp::SaveChanges
A client or
message store provider can check the current state of the message at any time
by calling the IMAPIProp::GetPropsXCFLAC method to change any flags that currently have
read/write access.
Several of
the flags are always read-only. Some are read/write until the first call to the
IMAPIProp::SaveChanges
The initial
values for PR_MESSAGE_FLAGS are typically MSGFLAG_UNSENT and MSGFLAG_UNMODIFIED
to indicate a message that has not yet been sent or changed. When a message is
saved for the second time, the message store provider clears the
MSGFLAG_UNMODIFIED bit. Another value that a message store provider can set
when a message is saved is the MSGFLAG_HASATTACH flag. MSGFLAG_HASATTACH
indicates that the message has one or more attachments. The PR_HASATTACH
property is computed from this setting.
When a client
calls the IMessage::SubmitMessage
As a message
is given to a transport provider for delivery, the transport provider sets the
MSGFLAG_FROMME flag if the sender had the same account on the messaging server
as the message was received on. Transport providers set MSGFLAG_FROMME for an
incoming message that has been sent from the currently logged on user. A client
can use this value to determine that it is more appropriate to show recipient
names in the contents table of the Sent Items folder than sender names.
Messages that have been saved during the composition process and not yet sent
should also be displayed with recipient names rather than sender names.
For an
incoming message, a message store provider clears the MSGFLAG_READ flag to
reset its read status. A client can set or clear the MSGFLAG_READ flag when it
is necessary to change the read status and control the sending of read and
nonread reports by calling either the message s IMessage::SetReadFlag
Message store
providers also set the MSGFLAG_UNMODIFIED flag for incoming messages.
MSGFLAG_UNMODIFIED indicates that a message has not changed since delivery. A
client cannot clear this value after it has been set by a message store
provider.
See Also
IMsgStore::AbortSubmit