[eluser]Rubiz'[/eluser]
Hi there!
Well, I'm confusing about how develop an app.
It will be an e-mail sender, so there must be lists with 100 or 5000 e-mails to send and it will be: if I send one by one, when I get 51 e-mails sent the server will get this as spam, and will break my e-mail sending.
So I have to send 50, wait for 15 minutes... send more 50, wait for 15 minutes...
The question is, how can I do that?
[eluser]Pascal Kriete[/eluser]
The easiest way to solve this is with a cron job. The other alternative is making a js script that refreshes every 15 minutes, but that tends to be unreliable and you would probably have to set the timeout to something closer to 20.
[eluser]Rubiz'[/eluser]
Thanxs for answering Inparo e Rick Jolly, I have read this post, it seems this subject is frequently asked!
And same senior developers have to think about better solutions for it.
A friend of mine told me about javascript functions, like setInterval and seTimeout, I could launch PHP by this, instead of get a refresh meta tag refreshing the browser all time.
1. Get and send 50 e-mails, keeping the last e-mail id sent.
2. PHP calls a time javascript function
3. After 15 min javascript calls the responsible controller and the process inits again...
You think this can be a fine solution?
[eluser]Rick Jolly[/eluser]
[quote author="Rubiz’" date="1207679893"]Thanxs for answering Inparo e Rick Jolly, I have read this post, it seems this subject is frequently asked!
And same senior developers have to think about better solutions for it.
A friend of mine told me about javascript functions, like setInterval and seTimeout, I could launch PHP by this, instead of get a refresh meta tag refreshing the browser all time.
1. Get and send 50 e-mails, keeping the last e-mail id sent.
2. PHP calls a time javascript function
3. After 15 min javascript calls the responsible controller and the process inits again...
You think this can be a fine solution?[/quote]
The answer is cron. There is no better solution.
[eluser]Rubiz'[/eluser]
Hmmm but I really dont know what u mean when you tell about it... I dont know it, its a feature?
[eluser]Myles Wakeham[/eluser]
You might want to download PHPList and look at its code (its open source). It does exactly what you are asking for, and has features to control the rate of sending emails as my PHP Hosting sites will place limits on the max number of emails they will allow you to send per hour. Its not a CI solution, but it does what you are requesting and you could adapt its code to your needs.
Myles
[eluser]Rubiz'[/eluser]
Thanx Myles Wakeham!! I'll be looking their site and analyse how their framework works.
[eluser]Thoer[/eluser]
I'm not sure how fast you need this, but I'm pretty close to releasing a similar open source application, based on codeigniter and codeextinguisher. I'm done with my Hungarian docs and about to start the English one. It would still make a lot of sense to add the job of sending out emails to the cron, but it will do well without it. It will share a lot of features with phplist. It sure won't be THAT mature for a while though.
[eluser]Rubiz'[/eluser]
Hmm, I'll work on it tomorrow... really fast, but tell me when its done, I'll love to know it!!