MyBB Community Forums

Full Version: Mass-email throttling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey there...

I've got a custom-made mass-emailsystem replacing the one in AdminCP. However, whenever we send out 8,000 emails, the system goes belly-up (shared hosting etc).....so I wanted to try to get the throttling system that is in the vanilla-MyBB also in use in my custom-system...but can't seem to find the code....
Can anyone help me?

thanks,
kimmo
Your going to need a linux or unix-based server to do this. But what you could do, is take your email script and make it run as a cronjob. So basically, it will run as a background task, and every so often it will send out another batch of emails, so that its not sending them all at once. Also, sending that many emails out at once, or in a similar time frame, usually causes your site to be marked as a spam server by whois.
I understand what you're saying...but there's already throttling in MyBB-code...I just wanted to use the same code in our own mass-emailer....
I may be wrong, but I think it's against the License to separate any component or code in MyBB for use in other scripts.

Again, I might be wrong. However, the functions your looking for are in inc/functions.php - send_mail_queue and just add any e-mails into the mailqueue table. You can write your own based on that code
Tikitiki Wrote:I may be wrong, but I think it's against the License to separate any component or code in MyBB for use in other scripts.

Again, I might be wrong. However, the functions your looking for are in inc/functions.php - send_mail_queue and just add any e-mails into the mailqueue table. You can write your own based on that code

thanks...please let me know if I am doing anything that is against the userlicense....
In any case, it will be probably only loosely based on it anyway as we have additional quirks with our mailer that have been developed for us...so I couldn't just drop in the code from there anyway...

EDIT: OOPS...spoke too soon...that code wasn't in functions.php...unfortunately I am still on the 1.18 with no upgrade path visible! Sad

EDIT2: Found the code actually in users.php...and there the throttle was manual...'click here to send the next 500', so we're developing our own new one now....thanks anyway Smile

cheers,
Kimmo
Well, you know the upgrade script is quite useful
oh I know....but when you have the level of integration that we do...the scripts are no longer usable Sad
Plugins?
oh no....our customizations started even before there really was any plugins
we're talking customized code...and plenty of it...
tens of our own files...amended code in the core...etc
It might be worth while to start getting your devs to either clear out the modifications or make them into plugins. When 1.4 comes out we will stop providing security fixes to the 1.1.x series.
Pages: 1 2