Like programs which transfer messages into the MTA, intermediate processing channels should also use the MTA_ENV_TO item code with mtaEnqueueTo(). When re-enqueuing a message, intermediate processing channels should also preserve any MTA envelope fields present in the message being re-enqueued. This is done using the MTA_DQ_CONTEXT item code in conjunction with mtaEnqueueStart() and mtaEnqueueTo(). Failure to preserve these envelope fields can result in loss of delivery receipt requests, special delivery flags, and other flags which influence handling and delivery of the message.
A Complex Dequeuing Example and A Simple Virus Scanner Example both illustrate the use of the MTA_ENV_TO and MTA_DQ_CONTEXT item codes. item codes. Both of those examples represent intermediate processing channels that handle previously constructed messages. As such, they do not need to alter the existing message header, and they preserve any MTA envelope fields.