Hey Everyone,

I know how to right a php script to send out an email. But I want to write a script that will send out an email at a certain time, The crux is, I need the email to be sent out even if nobody is accessing the page that holds the script.

So ideally I would schedule a time for the email to be sent out.
And then, the email would be sent at that time.


Any suggestions?

Recommended Answers

All 4 Replies

Hi stbtwitter,

Sounds like you want to set up a cron job. A cron job will run your PHP script at any interval that you set and can be set to indefinitely occur. If you have a web host with cPanel, you most probably will be able to set up your own cron jobs.

Please don't send spam emails. Hope this helps,

James

Use a php email sscript can do it?

Hi abeltenny0210,

Yep you can just write a normal PHP script that sends an email and then you set up a cron job in cPanel to run the script when you want.

Cheers,

James

Thanks everyone, No I am not sending spam, It is for a private social network

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.