I created a subdomain and I'm just using a catch-all mechanism in Cpanel to say 'send all mail to this subdomain to this php file'. According to the docs, I have to use a local path which removes my ability to just point that to a URL that my app would normally process. I had tried the other night to take the mail message and write it to a text file and then redirect using header() to a path in my actual application where I would read that file off the disk and process it. But it never gets into the application. It's like it ignores the header call.
I'm not really using an SMTP program. Emails come into the server and I just grab the stream from stdin and drop it to a file. I guess one way to do it would be to dump all the emails to an inbox and then read from the inbox but that would still be via cron job which also points to a file, not an application path.
I feel like I'm thinking about this the wrong way or something.