Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sp_send_dbmail question

Author  Topic 

jodders
Starting Member

41 Posts

Posted - 2012-08-23 : 03:40:20
hi guys,

I hope you can help me, I am investigating the Sp_send_dbmail function and I want to know if it can used or not in the scenario below.

I want to create an alert where if a figure goes over a threshold,an e-mail is send to specific people assigned to that "account". I have a daily SQL query which I can run which output this results. I now want to try and get this automated so it sends to the "Account owners only".

Can I use the sp_send_dbmail to help me do this?


In the arguements
[ @recipients= ] , can I choose it to look the person(s) e-mail address assigned? On some examples I have seen,it looks like you have to be specific.If i had over 50 alerts, it would need to go to whoever is responsible.

Any help would be great.
Cheers




RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-08-23 : 04:03:09
All it does is pass through the @recipients, so as long as it can resolve the names you put in there, it will send the email to that group. The easiest way is to set up group email accounts and let the network admins look after these groups.
Go to Top of Page
   

- Advertisement -