There are occasions where we have had a need to send an email at a scheduled time in the future, such as a reminder on the morning before an event. While there are options to send a delayed email with clients such as Outlook or Thunderbird, they rely on the users machine running with the client open, which is not always possible or desirable. I was looking for an internal server side solution that would allow a users to submit an email for delivery at a future time, however I was surprised to find that I was unable to find any such solution – at least not a free one.
I figured it should not be that hard to whip something basic together from existing tools.
In the end I just modified the Formmail script from Matt's Script Archive to provide this functionality.
So for anyone with the same issue, here are the files for providing a scheduled email delivery for your users which I have setup on an apache server:
Just copy the the delaymail.pl to a cgi-bin directory on your server. Note your should probably put it in a directory with access control enabled if you don't want spammers to take advantage of the service. Save delayemail.html to a location on your webserver and modify the “FORM ACTION=” line to point to the URL where you have saved delaymail.pl