Discuss this help topic in SecureBlackbox Forum
OnParse is invoked during message parsing and gives possibility to perform additional handling of the current message part.
Declaration
Parameters
- Source - source stream.
- HeaderCharset -
- BodyCharset - charset of the body.
- Options - parsing options.
- IgnoreHeaderNativeCharset -
- 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.
Default value - False
- 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.
Default value - False
- State - describes parsing event state.
- Item - indicates index of the current element for pstAddressFieldItem, pstHeaderFieldItem, pstBodyPartBefore and pstBodyPartAfter states.
- Boundary - current boundary value.
- bIsHandled - True value shows that current event has been handled and parsing for current state has to be excluded from further handling. But final states (with suffix 'After') can not be excluded from handling.
- bStopParse - True value shows that parsing must be interrupted. All further states except pstAfter will be skipped. pstAfter state is necessary for handler to be able to deallocate resources.
Return value
Returns 0 (EL_OK) or 1 (EL_WARNING) on success, and Error otherwise.
Description
Parameters
Header,
Source,
HeaderCharset,
BodyCharset,
Options,
IgnoreHeaderNativeCharset,
IgnoreBodyNativeCharset
correspond to
ParseMessage method parameters.
Note,Options enabling differs for VCL and .NET versions. To enable several options in .NET use bitwise OR operation, for example "mpoStoreStream | mpoLoadData | mpoCalcDataSize".
Discuss this help topic in SecureBlackbox Forum