Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

How can I use SQL SERVER trigger to send an email in C#

8:19 pm on Jan 23, 2010 (gmt 0)

New User

10+ Year Member

joined:Mar 13, 2009
posts: 5
votes: 0

I am building service failure notification system which notifies customers and management whenever there is a delay in the service. How can I use SQL SERVER trigger to send an email to a group of people when I add an alert in the alert database table using c#.
9:55 pm on Jan 23, 2010 (gmt 0)


WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
votes: 3

I have never had the need to use C# inside of SQL Server 2005/2008 to send mail. I have always done it with the use of SQL Triggers and SQL email abilities.

The basics is I setup one table, when a row is added will trigger an email to be sent out. And the row itself will contain the information for the email.

SQL Mail and SQLAgentMail [msdn.microsoft.com]
Create Trigger [msdn.microsoft.com]
xp_sendmail [msdn.microsoft.com]


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members