Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have read forums that mention Cron in (scheduled email). But I was not able to see an example or code. I am just worrying scheduled emails periodically every week (w/o clicking anything). The load of sending many emails would be second and less of my priority.[Just mentioning this so that if there are answers, the second will not be mentioned]

I am more on desktop applications, so I really don't have strong background with Web App....

Can anyone guide me through this. Like if (1)I need to write a script - how and what should I write on it, (2)If I need to associate the script to Cron - how should I do that.Please be elaborate. And if you have codes, please share.

And to mention, I am developing under Windows XP Pro SP2, XAMPP for PHP.
Thanks.
Posted
Updated 25-Apr-11 0:15am
v2

1 solution

You can write a custom script that would send the mail with contents necessary and add it to scheduler.

All you need to do for that is create a new scheduled task and perform the below when the task is initiated.

C:\Xampp\php\php.exe -f C:\Xampp\htdocs\my_script.php 


But while writing the PHP script you need to be careful.

Can you tell us what contents you want to include in that mail ?

BR//
Harsha
 
Share this answer
 
Comments
this_is_my_alias 25-Apr-11 10:22am    
the content will be a link/url to a page...can you give me an example on the script?
ZeeroC00l 25-Apr-11 10:55am    
Why dont you google for the link ??
And more over the script you should write in PHP is content specific and its upto you how you want to design it and what you want to do with the script.

You want to store the content somewhere and retrieve it with PHP script and then send it through mail, or anything else that you want to do.
this_is_my_alias 25-Apr-11 11:16am    
Yeah, I already found an example, quite exhausting looking for it :D ....I'll try to modify it. Thanks.
this_is_my_alias 25-Apr-11 11:21am    
I'll just post this link I've found. Others might want to see it as well. I'll still need to try it with the command line above. <link>http://stackoverflow.com/questions/2571658/how-to-schedule-emails-to-send-out</link>
ZeeroC00l 25-Apr-11 11:53am    
Nice to know that you found an example.. Any doubt in that the CP forum is always there to help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900