4D Internet Commands v14

IMAP_MsgLst

Home

 
4D Internet Commands v14
IMAP_MsgLst

IMAP_MsgLst 


 

IMAP_MsgLst ( imap_ID ; startMsg ; endMsg ; msgHeaderArray ; msgNumArray ; msgIdArray ; msgValueArray ) -> Function result 
Parameter Type   Description
imap_ID  Longint in Reference to an IMAP login
startMsg  Longint in Start message number
endMsg  Longint in End message number
msgHeaderArray  String array in Array of headers to retrieve
msgNumArray  Longint array in Array of message numbers
msgIdArray  Longint array in Array of Unique Msg IDs
msgValueArray  2D String array, 2D Text array in 2D Array of header values
Function result  Integer in Error code

The IMAP_MsgLst command is used to get specific information of mailbox contents. It allows the user to request specific columns of the message list. This command can only return header item values; it cannot be used to retrieve the body of a message. Header content is automatically decoded and converted if needed (see POP3_Charset for more information concerning the decoding and conversions rules).

imap_ID is a long integer reference to an open connection created with IMAP_Login.

startMsg is a long integer number that specifies the starting message number of the message range to be examined. The message number is a value representing the position of a message within the list of all messages in the current working mailbox.

endMsg is a long integer number that specifies the ending message number of the message range to be examined. The message number is a value representing the position of a message within the list of all messages in the current working mailbox.

Note: The IMAP_Delete, IMAP_MsgLstInfo, IMAP_MsgLst, IMAP_SetFlags, IMAP_GetFlags and IMAP_CopyToMB commands do not return an error if the startMsg is greater than the endMsg. In the event that this occurs, the command – in effect – does nothing.

msgHeaderArray is a string or text array that lists the specific e-mail headers you wish to retrieve.

msgNumArray is a long integer array returned containing the message numbers between startMsg and endMsg.

msgIdArray is a long integer array returning the Unique IDs of the messages between startMsg and endMsg.

msgValueArray is a 2-dimensional array that receives the data for each header specified in msgHeaderArray. Each requested header will have a matching array in the first dimension of valueArray.

Example  

 aHeaders{1}:="Date:"
 aHeaders{2}:="From:"
 aHeaders{3}:="Subject:"
 IMAP_MsgLst(IMAP_ID;vStart;vEnd;aHeaders;aMsgNum;aMsgId;aValues)

aValues{1}{1} may equal “Thu, 19 November 1998 00:24:02 -0800”
aValues{2}{1} may equal “Jack@4d.com”
aValues{3}{1} may equal “Call your wife”

Errors are handled the following manner:

1) Only communication-related error codes will be returned. If the command cannot complete its task because of an error (network, syntax, server, etc.) then the appropriate error code will be returned.

2) If a message within the specified range of messages does not exist or gets an error:

  • No array element is created for that message.
  • No Error code will be returned.

3) The inability to locate any or all of the specified headers within a message does not constitute an error:

  • An array element for the message will be created.
  • The aMsgNum and aMsgID array elements will contain the appropriate values.
  • For each header which does not exist in the message, a null string will be returned into that array element.
  • No Error code will be returned.

 
PROPERTIES 

Product: 4D Internet Commands
Theme: IC IMAP Review Mail
Number: 88871

 
HISTORY 

Created: 4D Internet Commands 6.8.1

 
SEE ALSO 

IMAP_MsgLstInfo

 
ARTICLE USAGE

4D Internet Commands ( 4D Internet Commands v11.4)
4D Internet Commands ( 4D v13.2)
4D Internet Commands ( 4D Internet Commands v12.1)
4D Internet Commands ( 4D Internet Commands v14 R2)
4D Internet Commands ( 4D Internet Commands v14)
4D Internet Commands ( 4D Internet Commands v14 R3)
4D Internet Commands ( 4D Internet Commands v14 R4)