Gentlemen,
I am trying to write an email processing script for an order system that records messages sent to certain email accounts, while still leaving them untouched to be be downloaded and answered by the people in charge of the email accounts in question.
The problem is, of course, that they might download the mail before the processing cron job runs. Now of course you can set their programs to leave copies on the server. But if you do not delete them at some point, the script will become a progressively bigger tax on the server.
Obviously to know not to download a message a second time when it is configured to leave a copy on the server, the email program must do something. Does it keep an internal record, or is the message on the server flagged in some manner? If so, can PHP detect this flag? I tried the imap_header function but nothing was returned that was of use that I could see.
Any input much appreciated, thanks.
Doc.