Limit number of emails sent per hour / email throttling

Email throttling has been suggested so I have merged the threads.

In the meantime you can try doing this.

The email send function sends 100 emails per page and automatically submits the next page.
You can delay that submission for x minutes, which will have the same effect as throttling to a specified number of emails per hour.

Edit the user_email_send admin template and replace the script block at the end with:

Code:
<script>
$('#emailButton').hide();
 
window.setTimeout(function() {
  $('#emailForm').submit();
  $('#emailButton').hide();
  $('#loadingImage').show();
}, 32 * 60 * 1000);
</script>

The 32 in the code above is the number of minutes to delay the next page submission.

A maximum of 59 minutes may be the limit as setTimeout might not like anything over an hour.

This only limits the email send function from within the ACP.
Any other emails related to threads, conversations, etc. will also need to be factored in.
 
I have this error by not administrate emails/hour
Code:
An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/gameradi/public_html/gamer/library/Zend/Db/Statement/Mysqli.php on line 77
 
    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
    Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 50
    XenForo_Error::unexpectedException() in XenForo/Application.php at line 295
    XenForo_Application::handleException()
That's a database error, not an email error..
 
Email throttling has been suggested so I have merged the threads.



Edit the user_email_send admin template and replace the script block at the end with:

Code:
<script>
$('#emailButton').hide();
 
window.setTimeout(function() {
  $('#emailForm').submit();
  $('#emailButton').hide();
  $('#loadingImage').show();
}, 32 * 60 * 1000);
</script>

just on question,
we must to this edit before install?
or after that xf installed we can do this change??
 
Email throttling has been suggested so I have merged the threads.

In the meantime you can try doing this.

The email send function sends 100 emails per page and automatically submits the next page.
You can delay that submission for x minutes, which will have the same effect as throttling to a specified number of emails per hour.

Edit the user_email_send admin template and replace the script block at the end with:

Code:
<script>
$('#emailButton').hide();
 
window.setTimeout(function() {
  $('#emailForm').submit();
  $('#emailButton').hide();
  $('#loadingImage').show();
}, 32 * 60 * 1000);
</script>

The 32 in the code above is the number of minutes to delay the next page submission.

A maximum of 59 minutes may be the limit as setTimeout might not like anything over an hour.

This only limits the email send function from within the ACP.
Any other emails related to threads, conversations, etc. will also need to be factored in.

Has anyone tried this and is it effective?
 
This is still an open suggestion. You'll need to check the code; but I see no reason why it shouldn't work.
 
The email send function sends 100 emails per page and automatically submits the next page.
The 32 in the code above is the number of minutes to delay the next page submission.
Hi, so if I set the code below to send 400 emails per hour, and you say the email send function sends 100 per page, does that mean I need to keep my browser page open for about 27 hours in order to send 8000 emails? Thanks.
<script> $('#emailButton').hide(); window.setTimeout(function() { $('#emailForm').submit(); $('#emailButton').hide(); $('#loadingImage').show(); }, 32 * 60 * 1000); </script>
 
Email throttling has been suggested so I have merged the threads.

In the meantime you can try doing this.

The email send function sends 100 emails per page and automatically submits the next page.
You can delay that submission for x minutes, which will have the same effect as throttling to a specified number of emails per hour.

Edit the user_email_send admin template and replace the script block at the end with:

Code:
<script>
$('#emailButton').hide();

window.setTimeout(function() {
  $('#emailForm').submit();
  $('#emailButton').hide();
  $('#loadingImage').show();
}, 32 * 60 * 1000);
</script>

The 32 in the code above is the number of minutes to delay the next page submission.

A maximum of 59 minutes may be the limit as setTimeout might not like anything over an hour.

This only limits the email send function from within the ACP.
Any other emails related to threads, conversations, etc. will also need to be factored in.

Is this also possible in XF 2.2?

This suggestion for email and domain throtteling exists since 2010! Please do it!
 
This is a must needed feature. I had to go back and look at every year's Registration Date From to dates and came up with 19 dates that I will be able to send out an email to all my members and not go over my servers 500 per limit.
This means it will take me 19 hours and 19 date entrees/submit to do this. Please add this feature!
 
Back
Top Bottom