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.
如何根据到达Exchange收件箱的电子邮件(启用POP3 / IMAP)在SQL Server 2005中触发存储过程?如果可能的话,我宁愿不使用Windows服务,而是使用SQL Server功能。
1 个解决方案
#1
Exchange has Event Sinks which could write data to the DB. Sample: http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx
Exchange具有可以将数据写入数据库的事件接收器。示例: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.
以某种方式使用SQL Server或Windows服务需要轮询更改,效率较低;要么通过密集轮询消耗大量资源,要么在发现新消息之前有一些延迟。事件接收器基本上是立即调用的,根据接收器,您甚至可以影响消息。
#1
Exchange has Event Sinks which could write data to the DB. Sample: http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx
Exchange具有可以将数据写入数据库的事件接收器。示例: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.
以某种方式使用SQL Server或Windows服务需要轮询更改,效率较低;要么通过密集轮询消耗大量资源,要么在发现新消息之前有一些延迟。事件接收器基本上是立即调用的,根据接收器,您甚至可以影响消息。