...
You register an SMTP filter with a call to SMTPQueueRegisterProcessor SMTPFilterRegisterFilter. In this call you provide a SMTPQueueProcessorProviderInterfaceSMTPFilterProviderInterface for the framework to call you to process commands, responses, data and manage lifetime management of your filter.
Sending Messages
The API also provides functions for sending SMTP responses and messages via SMTPFilterSendResponse and SMTPFilterProcessMessage. You can also send commands by setting SMTP context and calling SMTPFilterProcessCommand