.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Send notification to registered users

Posted By: Pawan     Posted Date: September 29, 2008    Points:2   Category :C#
Please help me, its very urgent. I have tried many ways to get through but all in vain.

I need to send a notification mail to all the user (whose email ids are there in my database table) whenever there is an insert or update or delete in another table , I need to send the mail including the ItemId changed/added to the database.

The data is coming through XML and we just have to access that table from the database if any changes are there in the table and send the notification to the user registered in another table including the details of the item changed or inserted/deleted.

We are just accessing the table in which the updation or anything happens. The insertion and updation is donwe through some other application in the database. and we have to access the same database and whenever there is an insert / update/delete happens in a particular table then we have to send the notification mail to the users registered in other table containg the modified record data

Author: Amit Mehra             
Posted Date: September 29, 2008     Points: 5   

You can use SQL Server to send mail and Write trigger for update and insert to the table. For sending mail from SQL server you can refer this Article.


Please "Mark As Answer " if this post help you.
Author: krishana singh             
Posted Date: October 16, 2010     Points: 5   

protected void hrfSubmit_ServerClick(object sender, EventArgs e)
if (con.State == ConnectionState.Open)
string insertcontact = "INSERT INTO tblContactUs(Uname,Address,Mobile,Email,Comment) VALUES('" + txtname.Text + "','" + txtadd.Text + "','" + txtmobile.Text + "','" + txtemail.Text + "','" + txtcomment.Text + "')";
SqlCommand cmd = new SqlCommand(insertcontact,con);
txtadd.Text = txtemail.Text = txtemail.Text = txtcomment.Text = txtname.Text = txtmobile.Text = "";

string bodytext = "<html>";
bodytext += "<table border='1'>";
bodytext += "<tr><td>Name: </td><td>'" + txtname.Text + "'</td></tr><br/>";
bodytext += "<tr><td>EmailID: </td><td>'" + txtemail.Text + "'</td></tr><br/>";
bodytext += "<tr><td>Mobile:</td><td>'" + txtmobile.Text + "'</td></tr><br/>";
bodytext += "<tr><td>Address:</td><td>'" + txtadd.Text + "'</td></tr><br/>";
bodytext += "<tr><td>Comment</td><td>'" + txtcomment.Text + "'</td></tr><br/>";
bodytext += "</table>";
bodytext += "</html>";
Email.SendMail(txtemail.Text, "info@theflowersworld.com", "Contact information", bodytext);
Email.SendMail("info@theflowersworld.com", txtemail.Text, "confirmation mail", "your information saved successfully ");
catch (Exception ex)

txtadd.Text = txtemail.Text = txtemail.Text = txtcomment.Text = txtname.Text = txtmobile.Text = "";

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend