Sending email at a specific date and time

Discussion in 'PHP' started by Gina Grafilo, Jul 11, 2009.

  1. #1
    Is there a way to program a database to send an email on a specific date and time (using phpmagic)? If so, can you please give me some pointers?

    Gina Grafilo
     
    Gina Grafilo, Jul 11, 2009 IP
  2. SFOD_D223

    SFOD_D223 Peon

    Messages:
    4,512
    Likes Received:
    174
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should be able to setup a CRON job via your webserver from host. If you have a host worth it's salt they could give you a step-by step process.

    Happy hunting!!
     
    SFOD_D223, Jul 11, 2009 IP
  3. jakomo

    jakomo Well-Known Member

    Messages:
    4,262
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Hello,
    Yes, as said SFOD_D223's you can use the CRON, you can write your script in PHP and execute it with CRON and wget..

    Best regards,
    JAkomo
     
    jakomo, Jul 11, 2009 IP
  4. The-host

    The-host Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Like the above two said, only cron will do the job for you. Otherwise you've to execute it at the specify time and date you want.
     
    The-host, Jul 12, 2009 IP
  5. zahidraf

    zahidraf Well-Known Member

    Messages:
    450
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    if you are on windows then .you can use task schedules and for linux cron is the solution as answered earlier
     
    zahidraf, Jul 12, 2009 IP
  6. KRISHNA KUMAR

    KRISHNA KUMAR Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yes! this is very easy. you should enable your cron job and make some setting so that so your run every minute/hour/day. keep this file in cron folder and in php script before mail function compaire your date/time with current date/time. if it is true then mail will be shoot.
     
    KRISHNA KUMAR, Jul 13, 2009 IP
  7. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can create new crons in linux by using the command

    crontab -e

    This will list all the existing crons and you can add your new cron which needs to be called on particular interval.
     
    HivelocityDD, Jul 13, 2009 IP
  8. Gina Grafilo

    Gina Grafilo Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thank you all for your suggestions. - Gina Grafilo
     
    Gina Grafilo, Jul 16, 2009 IP
  9. events

    events Active Member

    Messages:
    391
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #9
    You can also use a CRM solution which allows you to send emails at a specific date or time
     
    events, Jul 16, 2009 IP
  10. JefK

    JefK Member

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #10
    Don't forget that cron command you may use depends on your server. You should contact your hostadmin which cron commands may use, not all hosts supports all cron commands.
     
    JefK, Jul 18, 2009 IP