Returns one or more flags which identify characteristics of the
current message.
Syntax
object.MessageFlags [= flags ]
Remarks
The MessageFlags property returns information about the
currently selected message specified by the MessageIndex
property. The value returned is one or more of the following bit
flags:
Value |
Value |
Description |
mailFlagNone |
No flags have been set for the current message |
mailFlagAnswered |
The message has been answered |
mailFlagDraft |
The message is a draft copy and has not been delivered |
mailFlagUrgent |
The message has been flagged for urgent or special
attention |
mailFlagSeen |
The message has been read |
mailFlagRecent |
The message has been added to the mailbox recently |
mailFlagDeleted |
The message has been marked for deletion |
Setting the MessageFlags property changes the flags for the
currently selected message. Multiple bit flags can be combined using
the bitwise Or operator. An application can test if a flag is set by
using the bitwise And operator.
Note that this property should only be used when connected to a
mail server using the IMAP4 protocol.
Data Type
Integer (Int32)
Example
The following example demonstrates how to check the
MessageFlags property to see if the message has been marked
for deletion, and if it has, to clear the flag so that it will not be
deleted when the mailbox is unselected:
If (InternetMail.MessageFlags And mailFlagDeleted) <> 0 Then
InternetMail.MessageFlags = InternetMail.MessageFlags And Not mailFlagDeleted
End If
See Also
MessageCount Property,
MessageIndex Property,
MessagePart Property,
MessageParts Property,
MessageSize Property,
MessageUID Property,
GetMessage Method
|