Sending mail via mail() in batches

Is this possible without connecting phpmailer and the like? You need to send portions of 100 letters every 5 minutes.


Answer 1, authority 100%

phpmailer is not bad at handling this… I’ve already used it for mailing, it didn’t seem to slow down, though it wasn’t 100 somewhere, half or a little more.

I think you can send one copy to everyone, but I sent a new email every time.
I did this:

function MailSend($to, $subj, $txt)    {
              $mail = new PHPMailer(true);
              $mail->IsSMTP(); 
              $mail->Host       = "phh.tj"; // SMTP server
              $mail->SMTPDebug  = 0;                   
              $mail->SMTPAuth   = true;                 
              $mail->Host       = "phh.tj"; 
              $mail->Port       = 25;              
              $mail->Username   = "[email protected]"; 
              $mail->Password   = "***";        
              $mail->AddReplyTo('[email protected]', 'Mailer prikol.tj');
              $mail->AddAddress($to, 'User');
              $mail->SetFrom('[email protected]', 'Mailer prikol.tj');
              $mail->AddReplyTo('[email protected]', 'Mailer prikol.tj');
              $mail->Subject =  $subj;
              $mail->MsgHTML('<table cellpadding="10px" width=500px border=0><tr><td width="250px"><img src="https://prikol.tj/images/logo.png" alt=logo /></td><td style="font-family: arial" width="250">'.$txt.'</td></tr>');
              $mail->Send();
            }

And all this twisted in the loop of the list of my users:

$mysql = new db;
        $f=$mysql->query_only_s("SELECT email FROM pr_mailer");
        while($row=mysql_fetch_array($f))
        {
            $this->MailSend($row['email'], '  PRIKOL.TJ', '<p style="font-size: 13px">'.$txt.'</p><p style="font-size: 11px;">        <a href="http://prikol.tj/?do=removeEmail"></a>.</p>');
        }

Don’t forget to include class.phpmailer.php


Answer 2

Set up cron, the easiest way.


Answer 3

Well, make a script with delays. Or set up cron. Options – the sea.