Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a delay to sending newsletters


ambience

Recommended Posts

Posted

Hi,

 

As a newcomer to PHP I need a little assistance with some of the programming commands. My host has a strict usage policy:

 

Users may not send out mail to more than 20 addresses in one batch, whether sequentially or in parallel. Such batches must "sleep" for at least three seconds between each delivery attempt.

 

Fair enough. I thought it would be easy to modify the newsletter sending routine to accomodate that, and found the routine in /admin/includes/modules/newsletters/newsletters.php - Or at least I think it's the right one.

 

 while ($mail = tep_db_fetch_array($mail_query)) {

       $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);

     }

 

I would imagine that all I need to do is add a one second pause in this particular while loop. I don't know what the command is though, and how to implement a second statement in the while loop.

 

Would appreciate assistance and confirmation that I'm on the right path.

Graeme Simms.

  • 1 year later...
Posted

Has anyone thought about adding a contribution to contropl email batch and delay for the newsletter?

 

This is a major issue for shard servers as most restrict email send to prevent spam.

 

 

Any suggestions?

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...