Discuss this help topic in SecureBlackbox Forum

POP3: Receive the specific message from the mailbox

Use TElPOP3Client.GetMessageSize(index) and TElPOP3Client.GetMessageID(index) methods to get the size and the ID of the particular message by its index.

it is possible to download complete messages or just their headers (or headers plus any number of bodies lines). Each of these tasks can be performed in 2 ways: line-by-line or the whole message/header at once.

To get a complete message, call ReceiveMessage() method and pass the buffer or the stream where to store the message to. it is possible to request a message header plus any number of message body lines. To do this, call ReceiveMessageLines() and pass a buffer or a stream where to store the requested lines to. To get only the message header, call ReceiveMessageLines() method and pass 0 as lines number to request.

Examples:

C#:

// request 0 lines (i.e. the header only) from message #1 into the stream
pop3.ReceiveMessageLines(1, 0, stream);

// request the whole message #1 into the stream
pop3.ReceiveMessage(1, stream);

How To articles about POP3 client

Discuss this help topic in SecureBlackbox Forum