Doboy
Doboy

Reputation: 11082

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?

Upvotes: 0

Views: 244

Answers (1)

jpa
jpa

Reputation: 12176

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.

Upvotes: 1

Related Questions