http://qs1969.pair.com?node_id=19770


in reply to Background Process

An easy (non-perl) way to do this if you are using sendmail is to pass the -odq option to sendmail. This causes sendmail to queue the mail for sending later, instead of sending it immediately. Of course, you don't get fine-grained control over how long the delay is. Sendmail will process it at the next queue run interval, which is set in the sendmail.cf file.

If you wanted to clean the queue out every few minutes instead of waiting for sendmail to do it, you could always set up a cron job to run "sendmail -qSfoo@bar.com" where foo@bar.com is the "From" address on your email.