What I would like is a service (preferably something not installed on a server like just letting a third-party handle e-mails but if a dedicated server is necessary I’ll give it a shot) that allows any e-mails to my site to be redirected as a HTTP request to a php script I specify
For example a e-mail like this
To: chris@example.com
From: anotherplace@another.site.example.org
Subject: hello!
Message: Hey man whats up?
Would make a http request to
http://example.com/notify.php
With some POST data:
to=chris@example.com&from=anotherplace@another.site.example.org&subject=hello!&message=Hey man whats up?
I’d like to avoid polling every minute as I believe this would be a major drain on the server. Is there any pre-existing mail server or service that has these sort of features? My other plan would be to implement my own mail server but that seems like a huge project to undertake just to support this.
Set up a pipe alias in your MTA:
At that point you can have your script parse the email and open a URL with it properly encoded into the query string. Or it could just process the email directly.