views:

97

answers:

2

We have to build a small grievance report system. In this users enters their grievance on a ASP.Net page. An email is sent to particular individual of a department. When this individual opens this email in outlook and responds a field in a SQL server table needs to be updated.

How to accomplish this SQL Server update?

Platform : .Net Preferred language : C# Database : SQL Server Email client : Outlook

Thanks in advance

+6  A: 

Instead of putting the details in the email, you should send the Individual a link to a web page.

You can then use the web page to update the database.

The other option would be to set up a Web Service on the server that would update the database. You would then have to call the web service via JavaScript embedded in the email.

Outlook can sometimes be picky about executing JavaScript in email, so the first option would definitely be my preferred solution.

Justin Niessner
+1 Nice solution.
Walter
Safest too. No way should Outlook call a database or simply log the fact of opening: that's spam-like activity.
gbn
We were trying to avoid that extra page and also let user use the rich features of Outlook. But, from your response looks like there are other issues with this approach. I will look into your preferred solution. Thanks for your suggestion
DotWish
+1  A: 

check the following article to receive notification when user reads the email , then check the inbox for all incoming notification and update sql database.

mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess;
 //Add "Disposition-Notification-To" for Read receipt
 mail.Headers.Add("Disposition-Notification-To", "");

http://www.midnightprogrammer.net/post/Requesting-deliveryread-receipt-from-C-using-MailMessage-class.aspx

DEVMBM
Even though this does not directly help in my current situation, there is definitely lot of useful info in this and other posts on your website. Thanks for your response
DotWish