Jump to:

10842 Posts in 2512 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Newsletter - how to slow down the sending?

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1200 Views
  • bones
    Avatar
    Community Member
    103 Posts

    Newsletter - how to slow down the sending? Link to this post

    We need to send out 1500 emails, but our host (in common with many other hosts) block bulk emails if more than 500 per hour are sent out.

    Many people do not realise that their hosts do this, and receive no warning that their emails haven't been sent (our host phoned us up and told us last time).

    With this in mind, is there a way to slow down the sending of emails from the Newsletter module?

    I thought that adding the sleep() command would work, but don't know where to put it.

    <?php
    sleep(4);
    ?>


    Any suggestions? Thanks

  • smallstudio
    Avatar
    Community Member
    7 Posts

    Re: Newsletter - how to slow down the sending? Link to this post

    I've got the same issue - I'm assuming newsletter/code/BatchProcess.php is where this is defined, but don't know how to do it. Any help would be appreciated!

  • Optic Blaze
    Avatar
    Community Member
    150 Posts

    Re: Newsletter - how to slow down the sending? Link to this post

    The file that you are looking for is NewsletterEmailProcess.php

    After the line of code that reads '$newsletter->write();' [line 119]

    add the sleep command.... so it looks like this:

       $newsletter->ParentID = $this->newsletter->ID;
          $newsletter->write();
          sleep(8);

    1200 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.