We have a stock PHP ecommerce application that sends notification emails out whenever a successful purchase is made. We want one of the notifications to be sent 2 weeks after the purchase is made.
There are two approaches to this:
- Set up a queuing system using cron, php etc.. this will also involve modifying the 3rd party php ecommerce application we're using.
- Find a way to make sendmail queue it up to be delivered two weeks from the point of adding it.
What I'd like to know is if there's a header or something clever like that I can set on the message to delay the sending of it.. perhaps there's a plugin for sendmail that can achieve this?
Basically, I'm looking for a more hands-off way of delivering a message rather than hacking up the php as that would be a fairly big job whereas tinkering a bit with sendmail might be a lot easier.
The manpage for sendmail on the server in question states it's some kind of postfix wrapper:
sendmail - Postfix to Sendmail compatibility interface