Discuss this help topic in SecureBlackbox Forum

TElMessage.ParseMessage

TElMessage     See also     


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


Loads the message from stream and parses it.

Declaration

[C#]
    int ParseMessage(System.IO.Stream Source, string HeaderCharset, string BodyCharset, TElMessageParsingOptions AOptions, bool IgnoreHeaderNativeCharset, bool IgnoreBodyNativeCharset, bool bActivatePartHandlers);

[VB.NET]
    Function ParseMessage(ByVal Source As System.IO.Stream, ByVal HeaderCharset As String, ByVal BodyCharset As String, ByVal AOptions As TElMessageParsingOptions, ByVal IgnoreHeaderNativeCharset As Boolean, ByVal IgnoreBodyNativeCharset As Boolean, ByVal bActivatePartHandlers As Boolean) As Integer

[Pascal]
    function ParseMessage(Source: TElNativeStream; const HeaderCharset, BodyCharset: AnsiString; AOptions: TElMessageParsingOptions; IgnoreHeaderNativeCharset, IgnoreBodyNativeCharset, bActivatePartHandlers: Boolean): ELMIMERESULT;
    TElMessageParsingOptions = set of TElMessageParsingOption;

[C++]
    int32_t ParseMessage(TStream &Source, const std::string &HeaderCharset, const std::string &BodyCharset, TElMessageParsingOptions AOptions, bool IgnoreHeaderNativeCharset, bool IgnoreBodyNativeCharset, bool bActivatePartHandlers);
    int32_t ParseMessage(TStream *Source, const std::string &HeaderCharset, const std::string &BodyCharset, TElMessageParsingOptions AOptions, bool IgnoreHeaderNativeCharset, bool IgnoreBodyNativeCharset, bool bActivatePartHandlers);

[PHP]
    integer ParseMessage(TStream $Source, string $HeaderCharset, string $BodyCharset, integer $AOptions, bool $IgnoreHeaderNativeCharset, bool $IgnoreBodyNativeCharset, bool $bActivatePartHandlers)

[Java]
    int parseMessage(TElStream Source, String HeaderCharset, String BodyCharset, TElMessageParsingOptions AOptions, boolean IgnoreHeaderNativeCharset, boolean IgnoreBodyNativeCharset, boolean bActivatePartHandlers);

Parameters

  • Source - source stream. The stream must support seeking.
  • HeaderCharset - charset of the header.
  • BodyCharset - charset of the body.
  • AOptions - parsing options.
  • IgnoreHeaderNativeCharset - specifies what charset must be applied to the message header.
    True - the one specified in HeaderCharset
    False - the one specified in the message (if present) or specified in HeaderCharset if there is no charset specified in the message.
  • IgnoreBodyNativeCharset - specifies what charset must be applied to the message body.
    True - the one specified in BodyCharset
    False - the one specified in the message (if present) or specified in BodyCharset if there is no charset specified in the message.
  • bActivatePartHandlers - specifies if handlers must be invoked automatically.
    True - if there is a handler found for the part it will be invoked automatically during part processing.
    False - even if handler is found it won't be invoked automatically.

Return value

    Returns 0 (EL_OK) on success, 1 (EL_WARNING) if source data contains byte sequences illegal for given charsets.     Error otherwise.

ELMessageParsingOptions values

TElMessageParsingOptions values

Description

    Use this method to decompose message from stream into parts such as body, header etc. ParseMessage performs the function opposite to AssembleMessage.
     Note, Option setting differs for VCL and .NET versions. To enable several options in .NET use bitwise OR operation, for example "mpoStoreStream | mpoLoadData | mpoCalcDataSize".

See also:     AssembleMessage    

Discuss this help topic in SecureBlackbox Forum