Description
-
Called when user lists messages.
Return Type
-
None
Syntax
-
object.ListMessages Owner,
User, Folder
The ListMessages Method syntax has these parts:
object |
An expression evaluating to an object
of type IwodImapNotify. |
Owner |
Required. A wodImapServer
object. |
User |
Required. An ImapUser object.
Reference to user who wants to read messages. |
Folder |
Required. An ImapFolder
object. Reference to folder from where messages are
listed. |
Remarks
- NOTE: This method is called only if you
implemented IwodImapNotify interface in your application, and
wodImapServer1.Notification
property has received reference to instance of your
implementation.
-
- Once user opens specific folder and wants to see what are
available messages, ListMessages notification method is
called. At this point you should load all messages using
Messages.Add
method. You can keep your messages wherever you want - but
internally wodImapServer will access them as files on disk.
So, you can point Message.Filename
property to the file where message body is stored (in EML
format, just like Outlook Express or UNIX messages), or you
can use Message.Body
property and put message body contents directly into the
message.
You will notice that ListMessage is called more than once.
Each time user actually tries to access specific Folder,
wodImapServer will call this notification method. Usually -
you can just ignore it, but if folder contents is changed
(either by user's actions, or external source) you might
want to update contents - for example, to delete messages,
add new ones etc.
Don't forget - immediately after you add new message to
current Folder, you should also set its UID and Flags!
|