|
||||
|
[Feature Request]- Auto Response
Is there any way to customize the autoresponse feature to behave differently given a set a variable conditions?
Lets say I have an email coming to one email address: customerservice@domain.com It would be cool to set up the above email to autorespond with a different message depending on, lets say the subject of the incoming email or even the email address of the sender. Is this possible with Cpanel and if so does anyone know how to do this? Last edited by isol; 10-22-2003 at 12:29 AM. |
|
|||
|
Actually, it is quite simple to do.
I currently have it running on a site of mine right now. Step one: Create autoresponders for each message you to have as an autoresponder. When creating the autoresponder, use fictious email address that don't really exist. example. message1@yourdomain.com (and it's autorespond text) message2@yourdomain.com (and it's autorespond text) etc. Step two: Create filters for customerservice@yourdomain.com that forwards the email to the fictious email address that has the autoresponder set up you would like sent For example: If subject contains "this topic" Desitination message1@yourdomain.com If subject contains "that topic" Destination message2@yourdomain.com It's as simple as that. Last edited by Brian_Wilson; 10-31-2003 at 02:57 AM. |
|
|||
|
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. ;-) |
![]() |
| Thread Tools | |
| Display Modes | |
|
|