If you are running on Unix, there is something called "procmail" that does exactly this. I used it about 6 years ago to trigger a file build of something...Whenever the account got an email with a specific subject
string, it would fire off a perl script that built the file they wanted and emailed it back to them.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors