Let’s assume my php script sends a mail to receiver@example.com using the function mail(). In the $headers parameter of mail(), I specified sender@example.net. If receiver@example.com replies to this email, he may or may not include the whole conversation while replying. This will make impossible to know, for what the receiver is replying.
If there is a way which sends the mail sent by mail() directly to the “sent items” box of the sender@example.net, It would greatly help.
I know an alternative way. That is to send sender@example.net a copy of mail sent to receiver@example.com whenever a mail is sent using mail() but that would reach the inbox which would again make it clumsy to track the conversation.
Please tell me if there is a way to reflect the sent mail in the “sent items” box of sender@example.net.
Thank you
Peace to all…!
It’s not to simple…
PHP mail() just send an email throug system “sendmail” command, simplified it’s just an smtp client.
What you need is an IMAP client – PHP has a good IMAPlib extension, let’s go to try it. Btw, you need your user account to put the email to “sent items”, may be it’s not solvable.
Edited:
You should follow the instructions and examples on these sites:
http://hu.php.net/manual/en/function.imap-mail-move.php
http://hu.php.net/manual/en/function.imap-mail-copy.php
There are several example, I think you can do what you want with help of those.