1

Below is my requirement. Depending upon some condition I want to send the mail to the xyz user which will have two links "Accept" and "Reject" in the message body. When the recepient clicks either of the link an update/insert should be performed in the database against a particular record. For this , when I will be sending the mail, I will be requiring to send some unique Id along with the mail depending upon which I will be able to decide which record to update in the database. I am using SQl Server 2008 and C#.net. Does any one know how to implement it in VS 2008.

Regards, Prathamesh

prathamesh
  • 11
  • 2
  • i dont see the hard part... your **accept/reject** link can be a http url when clicked execute some sql – James.Xu Mar 31 '11 at 11:26
  • I think we need more information. Were exactly are you having problems (sending emails in ASP, database layout, updating database records, etc)? – hage Mar 31 '11 at 11:29

2 Answers2

1

It sounds like you're asking for a complete solution, which might be beyond the scope of this site. (Or it might not! I don't even know!)

That being said, it's pretty trivial to add HTML buttons or plaintext links to an email that point to a script on your webserver - you can style the interface however you like with HTML and CSS and a lot of email readers will render it properly. I was going to put together a pseudocode example but it's really not likely to be that helpful.

Winfield Trail
  • 5,535
  • 2
  • 27
  • 43
1

You can point the links in the email to a web page and add a query string to "mark" the correct row to update/insert. In the aspx page you need to make the logic to get the query string parameter and update the DB with the correct info.

Elad Lachmi
  • 10,406
  • 13
  • 71
  • 133