ListMail and ListMailX
Return a list of available messages on the POP3 server.
ListMail(
ListInfo)
ListMailX(
ListInfo)
Parameters
Parameter | Type | Direction | Description |
---|---|---|---|
ListInfo | string | OUT | Associated list of message
header information. The maximum size of this parameter is 10240000 bytes. If the message list is larger, you can retrieve the complete information using ListMailX iteratively by testing for $status = -16 (signature parameter size exceeded) after each activate.
|
Return Values
The member-value pairs that are stored in ListInfo are given in the following table:
Name | Description |
---|---|
NMB
|
Number of messages (during current session) |
ID
|
Message identification number |
FROM
|
Email address(es) and/or name of sender |
SUBJECT
|
Subject of email message |
DATE
|
Date and time when message was sent |
PRIORITY
|
Priority of an email message (1-5, highest-lowest) |
SIZE
|
Size of message text and attachments in bytes |
Value | Description |
---|---|
>= 0 | ListMail succeeded, number of entries
in the associated list
|
< 0 | ListMail failed
|
-8 | Not logged on |
-9 | Socket error |
-10 | Miscellaneous error |
-11 | Message retrieval failed |
-16 | Signature parameter size exceeded |
Description
The ListMail operation returns a list of descriptive header information for available email messages which are in the in-box of the POP3 server. The information returned in ListInfo consists of an associative list, where each list entry represents one email, of name-value pairs describing each message.
The function ListMailX is similar to ListMail, and uses the same parameters, but should be used iteratively when the message information is greater than 10240000 bytes.
The following example retrieves a list of all headers available on the POP3 server and passes the header text into a variable. If the data exceeds 10240000 bytes, the ListMailX operation is called repeatedly and the data is added to the variable until all the data has been retreived.
activate "UPOPMAIL".ListMail ($vEmailList) if ($status = -16) ; -16 indicates that data exceeds 10240000 bytes activate "UPOPMAIL".ListMailX (vEmailListPart) if (vEmailList) vEmailList = "%%vEmailList%%vEmailListPart" ; Add the data to the existing email list else vEmailList = vEmailListPart endif endif