Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To implement a Simple Mail Transfer Protocol (SMTP) OnArrival event sink, follow this procedure:
When the event dispatcher calls the ISMTPOnArrival.OnArrival method on your sink, it is passed an IMessage interface on a Message object that is bound to an ADO Stream object. The Stream object contains the message content within the transport itself. Modifications to the message content must therefore be saved to the transport Stream object by calling the IDataSource.Save method on the Message object.
Additionally, the IMessage.EnvelopeFields collection contains the message's transport envelope fields. All fields within this collection reside in the https://schemas.microsoft.com/cdo/smtpenvelope/ namespace. (Only Message objects passed to event sinks have contents in the IMessage.EnvelopeFields collection.) The message can be examined and modified by your sink. For information, see Using the SMTP Message Envelope Fields.
ADO Stream Object
Save Method
IMessage Interface
Message CoClass
Using the SMTP Message Envelope Fields
Implementing Sinks with Scripting Languages
Managing Event Bindings
Please sign in to use this experience.
Sign in