Thiru
Thiru

Reputation: 34

Send E-mail periodically to mail addresses stored in mysql using php

I am trying to create a website that needs to send Email every day to the mail addresses stored in mysql. After I googling I found cron concept can be used to do this. I need to know which is the best way to do this. If cron is the best one explain me how can i create the cron file in php. I am using XAMPP in windows.

Thanks in advance...

Upvotes: 1

Views: 868

Answers (4)

Justin Levene
Justin Levene

Reputation: 1677

You need to setup something called a CRON job on your server.

If you are using a a hosting service, this can be done in control panel.

If you are using control panel, good explanation here:

http://kb.enoi.se/setting-up-cron-jobs-scheduled-tasks-from-the-control-panel/

Upvotes: 0

Ariful Islam
Ariful Islam

Reputation: 7675

You need a simple php file for sending mail with your specific logic. Then you just call that php file via cron job. The process depends on your hosting server. So first decide about hosting server.

Upvotes: 0

Mark
Mark

Reputation: 776

for windows you may need to try this,

http://windows.microsoft.com/en-us/windows/schedule-task#1TC=windows-7

or check this one, contains more detail

http://support.microsoft.com/kb/308569

Upvotes: 1

Zane M.
Zane M.

Reputation: 490

All you need to do is write the php script that preforms the actions you wish, then create a cron job that executes the script. Check out this link https://drupal.org/node/31506, while it pretains to drupal the concepts should apply just fine for your case.

Upvotes: 0

Related Questions