Command POP3_GetMessage

4D Internet Commands

POP3_GetMessage

version 6.5


POP3_GetMessage (pop3_ID; msgNumber; offset; length; msgText) Integer

ParameterTypeDescription
pop3_IDLongintReference to a POP3 login
msgNumberLongintMessage number
offsetLongintOffset of character at which to begin retrieval
lengthLongintHow many characters to return
msgTextTextMessage Text

Function result Integer Error Code

Description

The POP3_GetMessage command returns the complete text of the message identified by msgNumber within the mailbox referenced by pop3_ID. Unless otherwise specified by the POP3_SetPrefs command, any linefeed characters within the message will be removed. The POP3_GetMessage command returns the entire block of the message, including header information.

pop3_ID is a long integer reference to an open session created with POP3_Login.

msgNumber is a long integer value indicating which message in the mailbox to retrieve. The msgNumber represents the position of a message within the current list of messages. You cannot rely on the msgNumber remaining the same for a specific e-mail item from session to session.

offset is a long integer value indicating the number of characters from the beginning of the message to begin reading. In most circumstances a zero should be passed to this parameter.

length is a long integer value representing the number of characters beyond the offset position to retrieve. Since the maximum length of a 4D text variable is limited to 32,000 characters, the length parameter should be set to any number below 32,000. Messages whose size is greater than 32K must be retrieved to disk via the POP3_Download command.

msgText is a text variable which will receive the retrieved text.

See Also

POP3_DownLoad, POP3_SetPrefs.