Search code examples
phpemailpear

PHP Pear Mail on reception


I would like to know if there's any way I can send a automatic answer to client when I open them mail who's comming from my website ?

Anybody have sugestion ?

Has asked here is more information:

I Have a online cart who send me a e-mail when I receive order, I would like that when I open the order there's a email automaticly been sent to the client to tell him that i've took his order. Like when you open a e-mail and that tell you that the sender asked to receive a confirmation that you've received the mail.

For resume I would like that when I receive a order mail, and open it there anoter email who's sent directly to the client telling him that i've openned his order and processing it.


Solution

  • You can create a script on your website, for example 'mysite.com/confirmread.php'. In this script you can write code to send an e-mail to the customer. Then, in the e-mail that is sent to you on the customer's order, you can create a link towards this script. You can click the link then, for example: 'mysite.com/confirmread.php?ordernr=2883992' or 'mysite.com/[email protected]'.

    Another way might be an automatic script that is fired once you open your e-mail. I'm thinking of a javascript / ajax script, which calls the same script (confirmread.php), but without you having to click the link. I'm not sure to which extent scripting is supported in e-mail clients (think of the difference between online vs offline mail clients).

    You can, of course, also reply the e-mail to another address of your own. For example [email protected]. This address can then be read by the PHP script. But I guess that's more complex.