public class SetFlagCommand extends Object
This operation works only for emails retrieved from UIDFolder, this means that
email messages must contain an UID (unique identifier) in the specified folder.
The POP3 protocol does not have support for retrieving an email from it's UID, on the other side the IMAP protocol is fully capable of doing the described action.
| Constructor and Description |
|---|
SetFlagCommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
setByNumber(MailboxConnection connection,
String folderName,
javax.mail.Flags.Flag flag,
int number)
Sets the specified
flag to the email of mailbox number number |
void |
setByUID(MailboxConnection connection,
String folderName,
javax.mail.Flags.Flag flag,
long emailId)
Sets the specified
flag into the email of UID (unique identifier) emailId. |
public void setByUID(MailboxConnection connection, String folderName, javax.mail.Flags.Flag flag, long emailId)
flag into the email of UID (unique identifier) emailId.
This method only works for UIDFolders, that are handled by the IMAP protocol
connection - the associated MailboxConnection.folderName - the name of the folder where the emails are stored.flag - the Flags.Flag that wants to be set in the email message.emailId - the unique identifier of the email in the corresponding UIDFolder of name folderNamepublic void setByNumber(MailboxConnection connection, String folderName, javax.mail.Flags.Flag flag, int number)
flag to the email of mailbox number number
This method only works for UIDFolders, that are handled by the IMAP protocol
connection - the associated MailboxConnection.folderName - the name of the folder where the emails are stored.flag - the Flags.Flag that wants to be set in the email message.number - the number of the email in the corresponding Folder of name folderNameCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.