One way to do it would be to create a "scheduled_emails" database table. Put all the emails you want to queue in there, including columns such as, recipient, subject, message and optional headers.
You could then set up a script to look at that table and send any emails that have a "send_time" which is greater than the current time. You could then set up a cron job to run this script every.. 5 minutes for example.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…