Making a mail hook to send a post request
Question
I want to do something similar to http://www.mailhooks.com/. When a email is received, it sends a post request to a provided website, but I don't know where to start implementing such a thing. Do textual email interface, such as mutt
and pine
allow receive hook, if not what would be the best way to do this?
Solution
An easy way is to use .procmailrc
or .forward
. Using either one you can pipe any incoming messages to a program of your choice.
E.g. using procmailrc:
:0:
| ~/myprogram
The program should then read the message from stdin and perform the post request.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow