Skip to content

Instantly share code, notes, and snippets.

@xnau
Created September 5, 2023 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnau/31d65f7ae7e609cb8f29d4a7873a10b1 to your computer and use it in GitHub Desktop.
Save xnau/31d65f7ae7e609cb8f29d4a7873a10b1 to your computer and use it in GitHub Desktop.
Shows how to obverride the Participants Database email session limit
<?php
/**
* Plugin Name: PDB Override Email Limit
* Description: sets a new outgoing email limit
* Version: 1.0
*/
// overrides the session email limit with a new limit
add_action( 'pdb-mass_email_session_limit', function($limit){
$limit = 500; // this is your new limit
return $limit;
} );
@xnau
Copy link
Author

xnau commented Sep 5, 2023

Alternatively, the action handler shown here can be added to your theme functions.php file.

WARNING: This does not guarantee that the number of emails you set here will go out! This only overrides the session limit that Participants Databases uses. The number of emails that can be sent is limited by several things: the complexity of the email itself, and the speed and configuration of your web server.

What will happen if you try to send too many emails is the process will hang when the php time limit is reached, and you may not know what emails went out or not. An email log can help with this.

Also be warned that sending out a mass email can get you in trouble with your hosting provider, especially on shared hosting. Most shared hosting does not allow mass email sends.

Note that Participants Database is not a mass email platform, it is not designed for that purpose and cannot support a large number of email sends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment