GetRawMail and GetRawMailX

Retrieve the complete text of the specified email message from the POP3 server, including all the header information, and attachments.

GetRawMail(MessageNr, MailSize, Message)

GetRawMailX(MessageNr, MailSize, Message)

Parameters

Parameter Type Direction Description
MessageNr numeric IN Number of the message to be retrieved from the POP3 server.
MailSize numeric IN Maximum allowed size of a message (including attachments) that can be downloaded from the POP3 server. Set this parameter to 0 to prevent size checking.
Message string OUT Full email messages. All headers are included, and attachments are present in the body of the mail message, rather than being stored in separate files. The maximum size of this parameter is 10240000 bytes. If the message is larger, you can retrieve the remaining text using GetRawMailX iteratively by testing for $status = -16 (signature parameter size exceeded) after each activate.

Return Values

Values Returned in $status
Value Description
0 Success
<0 GetRawMail failure
-4 Network timeout
-6 Size of message text and attachments exceeds MailSize
-7 Invalid message number
-8 Not logged on to POP3 server
-9 Socket error
-11 Retrieve of message failed
-16 Signature parameter size exceeded

Description

The GetRawMail operation retrieves the complete text of the specified email message, including all the header information, and attachments. The function GetRawMailX is similar to GetRawMail, and uses the same parameters, but should be used iteratively when the message text is greater than 10240000 bytes.

Unlike the GetMail and GetMailX functions, Uniface does not convert retrieved emails retrieved with GetRawMail and GetRawMailX to Unicode.

The following example retrieves the first email message, storing the entire email in the field MESSAGE:

activate "UPOPMAIL".GetRawMail(1, 0, MESSAGE)

Related Topics