Discuss this help topic in SecureBlackbox Forum

TElIMAPClient.FetchMessage

TElIMAPClient     See also     


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


Retrieves the whole message from the server.

Declaration

[C#]
    void FetchMessage(int ID, bool UID, System.IO.Stream Stream);
    int FetchMessage(int ID, bool UID, string HeaderCharset, string BodyCharset, TElMessageParsingOptions Options, bool IgnoreHeaderNativeCharset, bool IgnoreBodyNativeCharset, bool ActivatePartHandlers, out TElMessage Message);

[VB.NET]
    Sub FetchMessage(ByVal ID As Integer, ByVal UID As Boolean, ByVal Stream As System.IO.Stream)
    Function FetchMessage(ByVal ID As Integer, ByVal UID As Boolean, ByVal HeaderCharset As String, ByVal BodyCharset As String, ByVal Options As TElMessageParsingOptions, ByVal IgnoreHeaderNativeCharset As Boolean, ByVal IgnoreBodyNativeCharset As Boolean, ByVal ActivatePartHandlers As Boolean, Out Message As TElMessage) As Integer

[Pascal]
    procedure FetchMessage(ID : Integer; UID : Boolean; Stream : TElStream);
    function FetchMessage(ID : Integer; UID : Boolean; const HeaderCharset, BodyCharset : string; Options : TElMessageParsingOptions; IgnoreHeaderNativeCharset, IgnoreBodyNativeCharset, ActivatePartHandlers : Boolean; out Message : TElMessage) : ELMIMERESULT;

[C++]
    void FetchMessage(int32_t ID, bool UID, TStream &Stream);
    void FetchMessage(int32_t ID, bool UID, TStream *Stream);
    int32_t FetchMessage(int32_t ID, bool UID, const std::string &HeaderCharset, const std::string &BodyCharset, TElMessageParsingOptions Options, bool IgnoreHeaderNativeCharset, bool IgnoreBodyNativeCharset, bool ActivatePartHandlers, TElMessage &Message);

[PHP]
    void FetchMessage(integer $ID, bool $UID, TStream $Stream)
    integer FetchMessage(integer $ID, bool $UID, string $HeaderCharset, string $BodyCharset, integer $Options, bool $IgnoreHeaderNativeCharset, bool $IgnoreBodyNativeCharset, bool $ActivatePartHandlers, TElMessage &$Message)

[Java]
    int fetchMessage(int ID, boolean UID, String HeaderCharset, String BodyCharset, TElMessageParsingOptions Options, boolean IgnoreHeaderNativeCharset, boolean IgnoreBodyNativeCharset, boolean ActivatePartHandlers, TSBObject MessageRef);
    void fetchMessage(int ID, boolean UID, TElStream Stream);

Parameters

  • ID - contains either message sequence number, or its UID.
  • UID - defines how to treat the ID parameter. Set it to True if you provide message's UID, and to false if you provide the sequence number.
  • Stream - stream where the retrieved message will be stored.
  • HeaderCharset - charset of the message header.
  • BodyCharset - charset of the message body.
  • Options - specifies parsing options.
  • IgnoreHeaderNativeCharset - specifies what charset must be applied to message header:
    true - the one specified by HeaderCharset;
    false - the one specified in the message (if present). If not present, HeaderCharset is used.
  • IgnoreBodyNativeCharset - specifies what charset must be applied to message body:
    true - the one specified by BodyCharset;
    false - the one specified in the message (if present). If not present, BodyCharset is used.
  • ActivatePartHandlers - specifies whether to invoke handlers automatically:
    true - if a handler is found for a message part, it will be invoked automatically during part processing;
    false - even if the handler is found, it won't be invoked automatically.
  • Message - TElMessage object where the result is saved.
  • MessageRef - a reference to the TElMessage object where the result is saved.

TElMessageParsingOptions values

Return value

    When the message has to be parsed, returns 0 (EL_OK) on success, 1 (EL_WARNING) if source data contains byte sequences illegal for given charsets. Error otherwise.

Description

    Use this method to fetch message data. The first override just saves the retrieved data to stream. The second one attempts to parse this data into the provided TElMessage object.

See also:     Fetch    

Discuss this help topic in SecureBlackbox Forum