0

Following our company processes, our database has to send an email to a manager requesting for approval for some document record changes.

I was wondering if it was possible for the manager to reply to the server with an email containing "Yes" or "Approved" with the document# and have it update the document record accordingly. Right now, the manager has to send the QA dept the approval email, and they have to update the document record manually.

I have looked at SQL Mail, but it seems to be a bad way to go according to a lot of places.

We use Exchange 2010 and SQL Server 2008

Thanks!

4
  • The answer doesn't lie in SQL-land. You'll want to look in to the possibility of having Exchange execute some code on a given action.
    – gvee
    Nov 20, 2013 at 13:32
  • Ah, so on email receipt on that mailbox -> execute query ? What programming / scripting language would that be using ? (sorry if that sounds like a dumb question, my exchange experience is rather limited)
    – Anth0
    Nov 20, 2013 at 13:34
  • I'm afraid that my Exchange knowledge is also too limited to be able to answer this question. I assume that Powershell (with a call to sqlcmd?) would be the place to start looking but that's about all I can give ya!
    – gvee
    Nov 20, 2013 at 13:36
  • I'll have a look at that, thanks !
    – Anth0
    Nov 20, 2013 at 13:39

1 Answer 1

0

Do you have IIS installed in your environment? If so, you can redirect the user from Mail (Outlook) to a service page to update the document approval flag.

If so, create a ASP or ASPX page that takes two query parameters. A document id and a approval notice.

Put two links in the email for the manager to click. You will have to send the email from SQL server with a HTML body. Enclosed are sample links for document 123.

<a href="http://internal-site.mycompany.com?id=123&action=yes" target="_blank">Approve Change</a> 

<a href="http://internal-site.mycompany.com?id=123&action=no" target="_blank">Reject Change</a> 

Check out www3schools link below for details query string.

http://www.w3schools.com/asp/coll_querystring.asp

Check out the link below for details on working with databases.

http://blogs.msdn.com/b/morebits/archive/2010/09/26/working-with-data-beginners-guide-to-database-in-asp-net-web-pages-part-1.aspx

As an added feature, you might want to record the Active Directory (Windows Login) of who approved or rejected the document. That way, someone can not approve the document themselves. A date/time might be also handy.

This is one of many solutions you can use.

1
  • Thanks, I will definitely look into this.
    – Anth0
    Nov 20, 2013 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.