Notify user when item exists in database
I'm working on a piece for my project. My client would like a user to be notified on their cell or email when something appears in the database that doesn't already exist
How is the best way to go about this?
Should I run a stored procedure whenever an item is added to the database, which will check if that item added is matched to the one the user wants to be notified on?
Or should I have a stored procedure that runs every day to check for new items with matched notifications?
Lastly, I know how to send emails on my asp page, and I have heard you can do the same on SQL.
This will make the difference as to how to check for matches as well.
IF I can only send them from the asp page, then I will have to have a script that runs whenever a user uploads a book, because the interaction with that page will trigger the script, a procedure constantly running can't reach an asp page on its own to send the email via page.
So, can I have a stored procedure send an email? I think I'd prefer this? First of all it won't allocate towards any lag time client side when uploading a book, I like that.
If I can send an email via database, can someone share with me how that will look? Do I use a localhost for SMTP?
|