![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Oct 2007
Posts: 3
|
On receiving an email, execute a script
Is it possble using the linux servers at catalyst2 to execute a script - (PHP ?) when an email is received?
We currently received an email to say a particular action has occured. I would like to pick up on these emails, parse the header and then insert some data into our database. I don't want to do anything with the other email which may come into the mbox. Any help would be greatfully received. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Oct 2007
Posts: 3
|
That is great. I didn't spot that earlier.
So my next question is, what information do I have at my finger tips when I indicate that i want to run a script? Do I get a reference to the mail as a file, or do I have reference to the email stream? I am not sure what to expect here. Is there any examples of processing mail using a script running from a forwarder? |
|
|
|
|
|
#4 (permalink) |
|
Registered User
Join Date: Oct 2007
Posts: 3
|
Actually, I have just found the answer to my question. I am posting it here so that others can maybe find it useful:
http://www.mollerus.net/tom/blog/200..._with_php.html http://www.willmaster.com/blog/perl/...o-a-script.php The simple answer is that the content of the mail is available from stdin. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|