The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

php code for future mail sending

  • # January 5, 2010 at 12:48 am

    I am developing a greeting card website with PHP. At this point in time I am able to send card for current date and time (today’s date – immediately), but I need to know if I need to send card on some other future dates/ time, what should be done, give your suggestions please. If anyone has sample source code for this, please provide me.

    # January 5, 2010 at 4:36 am

    so you want to be able to send mail later on by scheduling the mail or do you want to be able to work out dates and times relatively like tomorrows date?

    you need to be a little clearer in your questions


    # January 5, 2010 at 8:18 am

    store all the data for the card in the database and use a cron job to check the database every 5 minutes to check if there is a date in the past, if so send the card if not do not send the card yet.

    # January 5, 2010 at 11:17 am

    This reply has been reported for inappropriate content.

    In some ways I agree with Argeaux however 5 minute recurring cron job is a little excessive. At maximum I would do it every hour, but I think that morning/afternoon would be more realistic or just set up a cron job to send at 9am every morning.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed