I think you guys mis understand, that script is already apart of a script im using which mass mails members, its my topsites.ragezone.com script, all i want is to be able to send it at desired intervals; ie;
send 1 email every 5 seconds.
To be perfectly honest, the script is too large for me to comprehend right now.
I see what you're saying though. You're not focused on anything except the interval part. Everything else you got down.
Also, I want to help, I just don't know where to stick my line of code. Perhaps you do?
If you do, well I understand you're not a coder, but if someone on this thread can find out where the loop is that goes through to send an email, if they could just put this in there to make it sleep 5 seconds,
Thanks :8:
Edit: Okay Well I went ahead and skimmed through the 1000 lines..
I found a section that sends emails to all the users,
PHP:
$sql = $udb->query("SELECT ".$this->f['email']." FROM ".$this->db['user']." WHERE ".$this->f['userid']." IN (".$_POST['users'].")");
while ($row = $udb->fetch_array($sql))
{
$emails[] = $row['email'];
}
$emails = implode(',',$emails);
$mailer = new mailer;
$mailer->to = '';
$mailer->bcc = $emails;
$mailer->subject = $_POST['subject'];
$mailer->usehtml = $_POST['usehtml'];
$mailer->from = $settings['sitename']." Mailer|||".$settings['email'];
$mailer->message = $_POST['message'];
@$mailer->sendmail();
It doesn't loop through, it emails everyone at once. That's the most efficient way to send emails to a list- And is the right way to do it. The problem with that is, there's no way to loop through and pause 5 seconds before each email is sent to an individual. Before any rational decisions are made to change the functionality of this system, are you absolutely sure that pausing a certain amount of seconds will fix the spam problem?
If so, it is possible to change the functionality to send an email to each user individually, though this isn't recommended due to much added performance. Also, closing the browser in the middle of a request will cause the form to quit half-way through. Additionally, 5 seconds extra wait-time will be added onto any performance load-time disadvantages.
Sorry, but I don't really see how having a set interval will prevent emails from showing up in spam.