This article has been archived. It is offered "as is" and will no longer be updated.
You cannot modify MAPI messages that are trapped in a Simple Mail Transfer Protocol (SMTP) transport event sink, such as one that implements the ISMTPOnArrival::OnArrival method. Any modifications made to these messages seem to be successful, and show up in the scope of the event sink, but do not persist to the actual message. Additionally, some properties, such as attachments and the message's body, may not be available.
SMTP transport event sinks for Exchange 2003 or Exchange 2000 can be used to trap all outgoing e-mail messages as they are handled by the SMTP transport layer. The cause of this problem is that Exchange converts MAPI messages to a temporary SMTP version for the event sink to handle, and then discards this temporary version after the event sink code finishes executing.
The key to the problem is how the message arrives at the Exchange server. A MAPI message can arrive at the Exchange server in the following ways:
A message is sent using a MAPI client, such as Outlook, from a mailbox on that server.
A message comes in through an Exchange Development Kit (EDK) gateway.
A message is routed from Exchange 5.5 in a mixed environment.
To resolve this problem, force all incoming messages to be in SMTP format. Force outbound messages through a border Exchange server or smart host by using an SMTP connector. Place the event sink on the border Exchange server or smart host. Because Exchange 2003 and Exchange 2000 servers communicate with each other through SMTP, all incoming messages to a border server or to a smart host should be in SMTP format. Therefore, the event sink should work as expected. Force the inbound messages to go through the border Exchange server or smart host where the event sink is installed. Inbound messages are received in SMTP format.For more information about how to do this, click the following article numbers to view the articles in the Microsoft Knowledge Base:
317680 How to add a disclaimer to outgoing SMTP messages in Visual Basic Script
For more information about how to force outbound messages through a border Exchange server or through a smart host, click the following article number to view the article in the Microsoft Knowledge Base:
293800 How to set up Windows 2000 as an SMTP relay server or smart host
For more information about how to configure the SMTP connector, click the following article number to view the article in the Microsoft Knowledge Base:
265293 How to configure the SMTP connector in Exchange
This behavior is by design.
Though this limitation is inherent to Exchange 2003 and Exchange 2000, it can be observed through the Windows SMTP Transport Event Sinks as well: