You need to write some VBA code
Open Visual Basic Editor from your outlook application and right-click on "ThisOutlookSession" and choose "view code". Then select "Application" and "New Mail" in the dropdown lists. Now you can add code in the Application_NewMail() sub. Basically, you just need to set some conditions and call pj.bat file. I don't know how to make a call with pj.