Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know if using MS Exchange there is a way to run code against outbound emails.

The code would need to trigger on emails sent to a specific domain, connect to a database, check for an email related to the email sent, and Carbon-copy that email to the related email.

What I'm trying to do: When gets an email, his auditor gets CC'd. Jack is in a MSSQL DB table related to his auditor's email.

Are there any samples of things like this being done?

share|improve this question
up vote 4 down vote accepted

There are methods for this. You'll have to register as a Transport Agent and there are API documents for doing this. This is in effect what Antivirus systems do. All mail will be passed through the Transport Agent. What your code does once it's passed off is up to you.

share|improve this answer
Thanks! I'd just like to note the documentation say it is a feature of 2010. – Incognito Jun 17 '10 at 20:26
It's also there in Server 2007, I've had to turn them off when troubleshooting AV issues, I just didn't find the MSDN link for them. This looks better: – sysadmin1138 Jun 17 '10 at 20:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.