October 18, 2006 at 9:23 am
Maybe it sound unusual, but here is what I need to do:
Whenever I receive email on my personal (not SQL Srever) email account from a certain sender, I need to execute a stored procedure. I was thinking about this but could not come to any solution. Any ideas, please ? Maybe new feature in 2005 as Notification services can do it ? I am not familiar with it yet.
Thanks.
October 19, 2006 at 7:32 am
My best guess would be that you would need to have a script running on your local PC that is running under your email account. SQL Server has no way of checking your personal email so a script (easily done) can be configured to run with an auto rule. When email arrives execute script.
Of course, if you don't want your email open all the time, you can do this as an application and run it as a service as well...
October 19, 2006 at 3:06 pm
The only way that I can see you doing this is if you use Outlook. You can access the Outlooks object with any microsoft program.....I used to have to get email from Outlook to Access, parse it and input it into a database.
You could write a .net app that checks your outlook mail box, if there is an email there, then run a command object to run the stored procedure in SQL Server.
A lot of work, but it can be done.
Anyone have any other ideas?? Not sure if you could get to Outlook by DTS??
October 19, 2006 at 3:26 pm
Redemption is a com object that allows you to interface with Outlook. You might want to look at that
http://www.dimastr.com/redemption/
I looked at DTS but saw nothing that allows me to interface with Outlook. Again though, you can use VBScript within Outlook to do this as well. (as Matt mentioned above) If you use Outlook and VBScript, you can execute a stored procedure from outlook.
You can also put VBScript into a DTS package and code it to read your mail in Outlook but then you are looping through all your mail from the SQL Server so running from Outlook would probably be cleaner. If you do go the DTS route though, you will need to have Outlook loaded on the SQL Server and you will need to use your NT account to run the SQL Server Agent service because it will use the credentials of the agent to connect to the mail server through outlook.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply