The parsed message may be output either as a message enqueue or written to an arbitrary destination via a caller-supplied output routine. When using a message enqueue context, observe the following points:
Specify MTA_DECODE_NQ for the output_type call argument.
Pass the enqueue context from mtaEnqueueStart() as the output.
Specification of the message’s recipient list must have already been completed with mtaEnqueueTo() before calling mtaDecodeMessage().
mtaEnqueueFinish() must not yet have been called for the enqueue context.
After the call to mtaDecodeMessage() has completed successfully, complete the message enqueue with mtaEnqueueFinish().
In the event of an error, the message submission should be cancelled, with mtaEnqueueFinish().
mtaDecodeMessage() will write the entire message header and content. There is no need for the caller to write anything to the message’s header or content.