View Single Post
  #5 (permalink)  
Old 10-31-2003, 02:57 AM
myplacedk myplacedk is offline
Registered User
 
Join Date: Oct 2003
Posts: 21
myplacedk
It can be more advanced than that, if you really want. :)

You can set up a filter that delivers to a script. I just did that, here's what I did and what happened:

I made a filter that delivers to:
|/home/myplace/a-test.php

The file is mod 755 and contains this:

#!/usr/local/bin/php -nq
<?php
$mail = file_get_contents('php://stdin');
mail('niels@myplace.dk','a-test virker',$mail);
exit (0);
?>

(The -n parameter is there because apparantly there is a configuration error on my host so php throws a warning when run in command-line, which the mail software thinks is an error.)

When a mail that matches the filter is received, I get a mail with that mail in it.

Now all you need is to parse the mail and find what you need. It should be simple enough for any php-developer.

So if you want to, you can adjust your reply by the sum of the ascii-values for the characters in the description of sender mail-software.

Now THAT is cool. ;-)
Reply With Quote