Making a mail hook to send a post request
문제
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?
해결책
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.
제휴하지 않습니다 StackOverflow