SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    0 Post(s)
    0 Thread(s)

    How can I make my form do this?

    I have a form that I e-mail people through which includes an attachment file and I would like to make it so once I click submit, it will send the e-mail out, the send another one 3 days later then another e-mail 6 days later.

    Can somebody give me an example of how I can make it so it will know to send the e-mail 3 then 6 days later? Or at least point me in the right direction?
    John Saunders

  2. #2
    SitePoint Addict The Mog's Avatar
    Join Date
    Dec 2002
    Manchester UK
    0 Post(s)
    0 Thread(s)
    there are a few alternatives that you have,

    one would be to add a date into a database when the first mail is sent, then add 3 days to the date, then run a script using a cron script to check for all emails to be sent on that day, once the second is sent set the date to the third date and so on,

    if you have a lot of records maybe it would be better to add a status field so that you can set the status, ie: 1 for first 2 for second etc.

    i am unaware of any function in php that will "Automatically" do something based on time, apart from like i said a cron script.

    Another alternative to using cron scripts would be a semi manual process example if you create a script to cycle your db and send the mails, then you manually cal the script whenever you want.

    Hope this helps a little



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts