Discuss this help topic in SecureBlackbox Forum

TElMessagePart.Parse

TElMessagePart     See also     


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


Loads MessagePart data from stream.

Declaration

[VB.NET]
    Function Parse(ByVal Header As TElMessageHeader, ByVal Source As System.IO.Stream, ByVal Boundary As String, 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 Parse(Header: TElMessageHeader; Source: TElNativeStream; const Boundary, HeaderCharset, BodyCharset: AnsiString; AOptions: TElMessageParsingOptions; IgnoreHeaderNativeCharset, IgnoreBodyNativeCharset, bActivatePartHandlers: Boolean): ELMIMERESULT;
    TElMessageParsingOptions = set of TElMessageParsingOption;

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

[PHP]
    integer Parse(TElMessageHeader $Header, TStream $Source, string $Boundary, string $HeaderCharset, string $BodyCharset, integer $AOptions, bool $IgnoreHeaderNativeCharset, bool $IgnoreBodyNativeCharset, bool $bActivatePartHandlers)

Parameters

  • Header - part header.
  • Source - source stream.
  • Boundary - boundary which is used to separate parts in multipart part.
  • HeaderCharset - charset of the header.
  • BodyCharset - charset of the body.
  • AOptions - parsing options.
  • IgnoreHeaderNativeCharset - determines what charset must be applied to the message header.
    True - the one specified in HeaderCharset
    False - the one specified in message if it exists or specified in HeaderCharset if there is no charset specified in the message.
  • IgnoreBodyNativeCharset - determines what charset must be applied to the message body.
    True - the one specified in BodyCharset
    False - the one specified in message if it exists or specified in BodyCharset if there is no charset specified in the message.
  • bActivatePartHandlers - shows if handlers must be invoked automatically.
    True - if there is a handler determined for the part it will be invoked automatically on part processing.
    False - even if handler is determined 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 part from stream into parts such as body, header etc.     Parse has the functionality opposite to Assemble.
     Note, Options setting differs for VCL and .NET versions. To enable several options in .NET use bitwise OR operation, for example "mpoStoreStream | mpoLoadData | mpoCalcDataSize".

See also:     Assemble    

Discuss this help topic in SecureBlackbox Forum