Admin Production ni-theme
Current Publication

InetPop3GetMessage

LabWindows/CVI

InetPop3GetMessage

int InetPop3GetMessage (int POP3Handle, int messageIndex, int numberOfLines, char **header, char **body);

Purpose

Returns the header and body of a POP3 email message.

Parameters

Input
Name Type Description
POP3Handle int A POP3 handle returned by the InetPop3Open function.
messageIndex int The zero–based index of a message on the POP3 server.
numberOfLines int The number of lines of the message body to retrieve. Pass –1 to retrieve the entire message body.

Note  Some POP3 servers do not support retrieving a specified number of lines. You must pass –1 for such POP3 servers.
Output
Name Type Description
header char * The header of the email message. Pass the address of a char* variable to hold the value. This function allocates memory for the value. You must discard this memory by calling the InetFreeMemory function. If you do not want this value, you can pass NULL for this parameter.
body char * The body of the email message. Pass the address of a char* variable to hold the value. This function allocates memory for the value. You must discard this memory by calling the InetFreeMemory function. If you do not want this value, you can pass NULL for this parameter.

Note  Some email messages may contain attachments. This library does not support parsing and detaching attachments. The attachment data is returned along with the rest of the body. You can parse the body of the message for the attachments and decode the attachments if needed. Typically the attachment data is inserted as MIME blocks and encoded in base–64 and other formats.

Return Value

Name Type Description
result int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: Internet Library

Include file: cvintwrk.h

LabWindows/CVI compatibility: LabWindows/CVI 7.1 and later