Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: Is there any way send out a specific number of newsletters per hour?

    Thanks for all the help.

    Sincerely,
    Bryan
    www.profitmart101.com

  2. #2
    Join Date
    Dec 2006
    Posts
    199
    Plugin Contributions
    0

    Default Re: Is there any way send out a specific number of newsletters per hour?

    For regular newsletters, my vote is for phplist. I found this thread because I'm researching a way to throttle back product notifications. I restock in big batches due to the nature of my business. Right now, I'm about to send a batch but I wanted to know if adding
    PHP Code:
    sleep(x
    into the loop would manually slow things. I don't care if it takes all night to process the notifications. I just don't want to anger the customers' hosts and get blocked.

  3. #3
    Join Date
    Feb 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: Is there any way send out a specific number of newsletters per hour?

    Yes, there is. I have written a program for Zen Cart that I have used for about a couple of months that sits in the Newsletter Manager, and will send out 1 newsletter (email) per X seconds to either all customers or to newsletter subscribers. X can be whatever you like. If X is 8 it sends out 480 emails per hour, perfect for shared host websites. I have added a counter to it, so you can watch it's progress. It's pretty easy to install. The best part is that it pulls directly out the database, eliminating the need to maintain a separate database for emailing or for creating newsletters in an outside program. If there was an interest in this program I will post it as a contribution, as I would very much like to see how more experienced programmers could improve on it.

    I regularly have been using it to send out to my list of about 6000, and it seems pretty bullet proof. However, if there was a way to add processing of bounced emails and other features like that it could approach being a full featured bulk email program that sits right in Zen Cart

  4. #4
    Join Date
    Dec 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Is there any way send out a specific number of newsletters per hour?

    I'd be glad to make use of this mod. I'm sending 17000 emails, and need to put some delays into the sending ..

  5. #5
    Join Date
    Feb 2007
    Posts
    52
    Plugin Contributions
    0

    Default Re: Is there any way send out a specific number of newsletters per hour?

    Quote Originally Posted by npn2531 View Post
    Yes, there is. I have written a program for Zen Cart that I have used for about a couple of months that sits in the Newsletter Manager, and will send out 1 newsletter (email) per X seconds to either all customers or to newsletter subscribers. X can be whatever you like. If X is 8 it sends out 480 emails per hour, perfect for shared host websites. I have added a counter to it, so you can watch it's progress. It's pretty easy to install. The best part is that it pulls directly out the database, eliminating the need to maintain a separate database for emailing or for creating newsletters in an outside program. If there was an interest in this program I will post it as a contribution, as I would very much like to see how more experienced programmers could improve on it.

    I regularly have been using it to send out to my list of about 6000, and it seems pretty bullet proof. However, if there was a way to add processing of bounced emails and other features like that it could approach being a full featured bulk email program that sits right in Zen Cart
    Is there a link available and / or more details?

    Thanks.

  6. #6
    Join Date
    Oct 2005
    Posts
    54
    Plugin Contributions
    0

    Idea or Suggestion Re: Is there any way send out a specific number of newsletters per hour?

    At approximately line 108 in the admin/includes/modules/newsletters/newsletter.php file you will find the following:

    //force output to the screen to show status indicator each time a message is sent...
    if (function_exists('ob_flush')) @ob_flush();
    @flush();

    $audience->MoveNext();
    }

    I changed mine to this:

    //force output to the screen to show status indicator each time a message is sent...
    if (function_exists('ob_flush')) @ob_flush();
    @flush();
    // Delay code to slow emails
    zen_set_time_limit(60); //reset timeout limit to avoid timeouts in long email sends
    // Delay time calculation is number of seconds in between email sends. 3600 seconds divide 80% of server email limit.
    sleep(3600/(350 * 0.8)) ;

    $audience->MoveNext();
    }

    There are other ways to approach this with setting the 250 emails per hour as a variable instead of a hard coded number. Test it on a smaller batch to start with to make sure you get it right before you send off 1000's of email and blow the server limits. This example should result in approximately 280 emails per hour leaving overhead for 70 normal outgoing and incoming messages an hour.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Is there any way send out a specific number of newsletters per hour?

    Quote Originally Posted by scubasteve View Post
    // Delay code to slow emails
    zen_set_time_limit(60); //reset timeout limit to avoid timeouts in long email sends
    // Delay time calculation is number of seconds in between email sends. 3600 seconds divide 80% of server email limit.
    sleep(3600/(350 * 0.8)) ;
    NOTE: Not all servers can handle that.
    ie: some hosts prevent altering the timeout limit or setting it higher than a certain value
    ie: some hosts have scripts set up to kill scripts that run longer than the threshold set
    ie: many hosts will lose their database connection during such a long activity time, or will flag your application as taking too long to complete or using too much database/CPU time.

    That said, if it works for you, great ... but if someone tries it and it doesn't suit them, at least they've been warned
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Limiting number of newsletter emails sent per hour?
    By gabstero in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 22 Feb 2011, 11:44 PM
  2. Duplicate per item? Is there any way?
    By xandros2000 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Aug 2010, 04:57 PM
  3. Is there any way to have product-specific attributes instead of global ones?
    By Ibrahim in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 11 Aug 2008, 03:54 PM
  4. Any way to send out free downloadables?
    By Originator in forum General Questions
    Replies: 2
    Last Post: 27 Jul 2008, 08:13 PM
  5. Replies: 1
    Last Post: 31 Jul 2007, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg