| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
IMAP Selected State: Message Manipulation Process and Commands (Page 3 of 3) The FETCH and STORE Commands This command list might seem surprisingly short; you might wonder, for example, where the specific commands are to read a message header or body, delete a message, mark a message as seen and so forth. The answer is that these (and much more) are all implemented as part of the powerful and flexible FETCH and STORE commands. The FETCH command can be used to read a number of specific elements from either one message or a sequence of messages. The list of message data items specifies what information is to be read. The data items that can be read include the headers of the message, the message body, flags that are set for the message, the date of the message and much more. The FETCH command can even be used to retrieve part of a message, such as one body part of a MIME multipart message, making it very useful indeed. Special macros are also defined for convenience. For example, the client can specify the message data item FULL to get all the data associated with a message. The compliment to FETCH, STORE, is used to make changes to a message. However, this command is not used to modify the basic message information such as the content of headers and the message body. Rather, it exists for changing the message's status flags. For example, after replying to a particular message, the client may set the \Answered flag for that message using the STORE command. Message deletion in IMAP is done in two stages for safety, as in POP and many other protocols. The client sets the \Deleted flag for whichever messages are to be removed, using the STORE command. The messages are only really deleted when the mailbox is expunged, typically when it is closed. The search facility in IMAP4 is also surprisingly quite sophisticated, allowing the client to look for messages based on multiple criteria simultaneously. For example, with the appropriate syntax, you could search for all posts that are flagged as having been answered, that were sent by Jane Jones before April 1, 2004. Users of IMAP clients can thus easily locate specific messages even in very large mailboxes, without having to download hundreds of messages to hunt through.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||