SQL Server Performance Forum – Threads Archive
Sending Email Based On Insertion of Record
Hello All I’m trying to figure how I can send an email to someone based on a record being inserted into a particular table. My scenario is this. I want to send an email to a technician everytime a work order is created in the database for that technician. Each new record has a status of ASSGN when first created. Is there anyway to send an email based on this status when it’s first entered into the work order table? ThanksKH
You could add a trigger to the that checks that the status has been inserted, and use xp_sendmail to e-mail a record.
HarryArchibald’s recommendation is the standard solution to this issue. ——————
Brad M. McGehee
Webmaster
SQL-Server-Performance.Com
quote:Originally posted by HarryArchibald
You could add a trigger to the that checks that the status has been inserted, and use xp_sendmail to e-mail a record.
Thanks for the response, I’m new to the server side so I’m investigating some examples of triggers that will help me with the problem. I will go in the direction you mentioned. Thanks again.
quote:Originally posted by bradmcgehee
HarryArchibald’s recommendation is the standard solution to this issue.
——————
Brad M. McGehee
Webmaster
SQL-Server-Performance.Com
Brad M. McGehee
Webmaster
SQL-Server-Performance.Com
I will need to research the trigger aspect, I’m new to writting triggers of that nature. Thanks for the response.
Why not check MS NOTIFICATION SERVICES release recently, I don’t the link currently and have seen earlier in MS website. HTH Satya SKJ
thanks for the hint, I will research it tonight.
]]>