Discuss this help topic in SecureBlackbox Forum

TElPOP3Client.ReceiveMessageLines

TElPOP3Client     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Retrieves the header and specified number of message lines from the server

Declaration

[C#/Java]
    void ReceiveMessageLines(int Index, int LineCount);
    int ReceiveMessageLines(int Index, int LineCount, byte[] Buffer, int Offset, int Count);
    void ReceiveMessageLines(int Index, int LineCount, System.IO.Stream Stream);

[VB.NET]
    Sub ReceiveMessageLines(ByVal Index As Integer, ByVal LineCount As Integer)
    Function ReceiveMessageLines(ByVal Index As Integer, ByVal LineCount As Integer, ByVal Buffer As Byte(), ByVal Offset As Integer, ByVal Count As Integer) As Integer
    Sub ReceiveMessageLines(ByVal Index As Integer, ByVal LineCount As Integer, ByVal Stream As System.IO.Stream)

[Pascal]
    procedure ReceiveMessageLines(Index: Integer; LineCount: Integer);
    function ReceiveMessageLines(Index: Integer; LineCount: Integer; Buffer: ByteArray; Offset: Integer; Count: Integer);
    procedure ReceiveMessageLines(Index: Integer; LineCount: Integer; Stream: TStream);

[C++]
    void ReceiveMessageLines(int32_t Index, int32_t LineCount);
    int32_t ReceiveMessageLines(int32_t Index, int32_t LineCount, const std::vector<uint8_t> &Buffer, int32_t Offset, int32_t Count);
    void ReceiveMessageLines(int32_t Index, int32_t LineCount, TStream &Stream);
    void ReceiveMessageLines(int32_t Index, int32_t LineCount, TStream *Stream);

[PHP]
    void ReceiveMessageLines(integer $Index, integer $LineCount)
    integer ReceiveMessageLines(integer $Index, integer $LineCount, array of byte|string|NULL $Buffer, integer $Offset, integer $Count)
    void ReceiveMessageLines(integer $Index, integer $LineCount, TStream $Stream)

Parameters

  • Index - index of the message to receive
  • Lines - the number of lines to retrieve
  • Buffer - buffer to which the message should be placed
  • Offset - position in the buffer where to start writing the data to
  • Count - number of bytes in buffer available for writing
  • Stream - the stream to save the message to
  • LineCount - ...

Return value

    The overloaded method which reads the data into the buffer returns the number of bytes copied to the buffer.

Description

    Call this method to retrieve the header and N first lines of the message from the server. The method uses TOP command, which is optional, so before using the method check it's availability using ExtTOPSupported property.

    The simplest method overload (which has only Index as a parameter) passes message data via OnMessageLine event. Other overloads eiter let you provide a memory buffer or Stream/TStream object or parse a message for you.

See also:     ExtTOPSupported     GetMessageCount     GetMessageSize     OnMessageLine    

Discuss this help topic in SecureBlackbox Forum