开发者

How to send schedule emails using php without cron job

I want send schedule mails using my php website, I don't want to use cron job because shared hosting environments might not provide all the functions.

So how can I send schedule mails with my site. Please let 开发者_如何学运维me know.

Thanks in advance, Laxmilal Menaria


Check out:

http://www.onlinecronjobs.com/

The purpose of this website is to allow website administrators without cronjob service on their own host, run cronjobs.

It claims to be free service although I haven't tried it.


You can send emails using visitor hits. Write somewhere (db) the last time you runned job.

$now = time();
if ($now > $last_sent_time + 3600) {
  // code that sends emails
  // goes here ....... 

  set_last_sent_time($now);
}

I think you got the idea. You should put this code on every request to site. The example sends emails every hour.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜