Hello friends. I am using php mail function for sending mail. Is it possible using php mail to send the mail to the users at particular time? Let say I have one mail and I want to send that mail at 5 PM today. Is it possible? Please help me. Thanks in advance.
yes you can use php to do this Create a table which will store the email id and email to be sent and time Just put the info in that table Now create a seperate php program which will query that table and compare the time with the time in table and send email Put that program in cron say every 15 min Thats all Regards Alex
Thanks for the reply.... I searched google for automated mail sending using PHP. But I was unable to find anything. Please explain me by example how can I do this? Thanks again....
Yes....you can use cron, IMHO, you should set the cron in the server setting,..in my case,...i use cpanel to set the cron as KMAP said above.
actually I am a newbie in this stuff so what changes that i have to make? Should I have to change configuration of php.ini in the server? And what is cron and how can I use it?
Essentially what they are saying is you create a very simple php script which looks in a database table for an email. Now the database table could look something like this. EmailAdd | Subject | Body | TimeToSend | | my sub | my body | 23/12/07 17:00 | Your php script could then check the database for emails to be sent something simple like if($row[TimeToSend ] < $timeNow) { sendEmail(); // Obviously do some checking here to see if the email sent was correct and delete the email from the table if so } You could then have a cron job run this every 15 mins. Now cron is nothing to do with php. It is a separate program that runs on linux. Some hosting companies allow you web access to cron jobs. Or if you have shell access you can run crontab -e A good example of using cron can be found en.wikipedia.org/wiki/Crontab I think I'm correct in all that. If I'm not some one will point it out
Is difficult to explain how to do it, because you haven't base knowledges about it. Here my advice: try to find free script like PHPmailer or something like this. Is much enouth subscribing scripts.