Forum Moderators: coopster

Message Too Old, No Replies

How to send mail at a later time

is it possible?

         

too much information

6:08 pm on Sep 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a form on my site that I would like to generate an automated response from when it is submitted.

The trick is that I want the auto response to send an hour or so after the form is submitted. If I'm using PHP to send mail is there something I can add to the header of an e-mail to tell it to send at a specific time?

jatar_k

9:00 pm on Sep 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



not so far as I know

the approach I have used for delays is to write the information (or the whole email) to a file, then run it on cron every hour, the cron can open the file, look what needs to be sent, send them and remove them from the file.

too much information

10:21 pm on Sep 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's a little more than I wanted to get involved with. I was hoping for something like "X-setdelay: 2hr"

I don't have access on this server to change my mail configuration otherwise I might be able to work with that.

Judging from my search results, this doesn't seem to be something that many people are interested in.

mcavic

11:35 pm on Sep 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



write the information (or the whole email) to a file, then run it on cron

That's the only way. Sendmail can be configured to only send messages every so often, but that would delay all mail going through the server.

too much information

11:47 pm on Sep 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the problem is that the site is in a Windows server, so I could write the info to a database, include a time, then trigger a script to send messages then delete after a certain time.

I'm working on moving the site to a linux server, but until then I am fairly limited.

I might just stick to the old, form mail when I get a chance method, but I thought the delayed automailer would be pretty cool. Maybe that's something I can work on.

Thanks for the input.