views:

110

answers:

1

How can I trigger a stored procedure in SQL Server 2005 based on emails arriving in an Exchange inbox (with POP3/IMAP enabled)? I'd rather not use Windows Services if possible, and use the SQL Server functionality instead.

+1  A: 

Exchange has Event Sinks which could write data to the DB. Sample: http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx

Doing thins using SQL Server somehow or a Windows Service would require polling for changes, which is less efficient; either you consume much resources through intensive polling or you have some delay until you notice a new message. The event sinks are basically invoked right away, and depending on the sink you can even influence the message.

Lucero