Reputation: 13
I am writing an intranet application for my company, and there is a transport reacquisition system. When someone posts a request, and if the manager is not the one sending the request, the manager receives the request as an email so he can approve it. The point is that when he forwards that mail to a certain email address a program should detect that email and execute query.
How can I achieve this?
Upvotes: 1
Views: 670
Reputation: 238078
The usual way to do this is to have a scheduled job that reads a mailbox. Most mail servers support POP, so you could use a POP client, like C#Mail. The scheduled job logs in to the mailbox, retrieves the mail, and deletes it when it's done.
Upvotes: 3
Reputation: 432210
Wouldn't it make more sense to have a link in the email that hits a web page that calls the database?
There is no guarantee on email delivery so you can't assume that the forward from manager actually gets there in a timely manner. Which leads me to ask: why isn't there a web page that the manager can view and approve requests?
Upvotes: 0