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?