Hunny Software Library Reference

Pop3Client.Top Method 

Sends the TOP command.

[Visual Basic]
Public Sub Top( _
   ByVal msgNum As Integer, _
   ByVal numLines As Integer, _
   ByVal lines As LineSink _
)
[C#]
public void Top(
   int msgNum,
   int numLines,
   LineSink lines
);

Parameters

msgNum
The message sequence number of a message in the POP3 mailbox.
numLines
The number of lines of the message to retrieve.
lines
A delegate for a method that the library calls for each line of the message list.

Remarks

The TOP command request that the server send the first part of a message. The first argument of the TOP command is a message sequence number that specifies a message in the POP3 mailbox. The second argument is the number of lines of the message body that the client wants to retrieve.

The server's response is a multiple line reply. To get the lines of the message, you must have a method that the library calls for each line of the message. You provide this method as a delegate in the lines parameter. Each line of the response contains a line of the specified message.

Note: The TOP command is an optional command that may not be implemented by all POP3 servers. If a server does not implement the TOP command, it returns a failure response.

Exceptions

Exception TypeCondition
ExceptionIf a network or protocol error occurs.

See Also

Pop3Client Class | Hunny.Mail Namespace | POP3 TOP command