views:

625

answers:

3

I have a job that runs which sends out emails to our users to which starts off a work flow process in our company. Periodically, a user will swear up and down that they didn't receive the email - though, when we go to the mail administrator to pull an exchange report, 10 times out of 10 it's in their deleted items. :P

I'd like to be able to programmatically verify that messages sent via .net C# (System.Net.Mail I think) reached the user's mail box.

It's exchange 2007 and all messages are internal.

+2  A: 

You can't with System.Net.Mail. You'll have to dig through Exchange's APIs to determine if an email is present in someone's email account.

http://support.microsoft.com/kb/813349

Spencer Ruport
Sorry for the delayed response - vacation gets in the way :).This looks like a good route to go.Thanks!
Dave
+1  A: 

Set an account for catching all bounce backs. In this way you will know which ones reached and which ones did not. This is the best way to ensure emails reached.

Alternatively you can add read reciepts via message headers(by setting the Disposition-Notification-To). but again, user can chose not to read it...

CodeToGlory
A: 

I see two ways to do what you want:

  • Send emails with "delivery confirmation" On (not "read receipt", this can be dismissed by the user as CoddeToGlory said). Then it's jut a matter of monitoring the mailbox that receives these confirmations via any way it's appropiate to you: Exchange Web Services, Outlook+COM or VBA, MAPI, ...

  • Use the powershell interface to Exchange and capture the output of Get-MessageTrackingLog looking for StoreDriver + Deliver events.

Jordij
Thanks for the response, I'm going the route described by Spencer.
Dave