Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Transferring Messages into the MTA

When transferring a message originated elsewhere into the MTA, programs should use the MTA_ENV_TO item code with mtaEnqueueTo(). This way, each of the recipient addresses will only be added to the message’s envelope, and not to its already constructed header. Additionally, supply the message’s header as-is. Do not remove or add any origination or destination header lines unless necessary. Failure to use the MTA_ENV_TO item code will typically cause the SDK to add Resent- header lines to the message’s header.

A Complex Dequeuing Example, and A Simple Virus Scanner Example both illustrate the use of the MTA_ENV_TO item code.