This technical article and sample event sinks assist developers in creating SMTP and Transport event sinks using Microsoft Visual Stuidio .NET and the .NET Framework.
Writing Managed Sinks for SMTP and Transport Events
Writing Managed Sinks for SMTP and Transport Events