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

55

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...

386

Answer

Solution:

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

746

Answer

Solution:

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.

716

Answer

Solution:

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.

942

Answer

Solution:

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/

People are also looking for solutions to the problem: add unique id to php mysql upload

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.