Hi,
I thought this would be really easy to find, but I am having trouble finding stuff and understanding what is what.
I want to send an e-mail to all contestants for a contest after a manager clicks a button. My code cycles through all the contestants and checks if a time has been filed in. If this is the case, a personalized will be sent to the contestant. The e-mail template looks like this:
"Hi [name contestant],
[...]
You should be present at [starting time]
kind regards [..]"
This all works perfectly until there are more than 20 contestants. Since this is usually the case, this won't work.
If I understand correctly a plugin like Throttler should solve this, but I tested it using the code in this topic and couldn't get it to work.
The code I used:
$this->modx->mail->plugin('throttler', array(
'active' => false,
'rate' => 20,
'mode' => 'messages' // toggle 'bytes' for Bytes ;) Do yehr own calculation
));
I didn't get the 'mode' part with the comment about calculating size in bytes (?). But I thought this wasn't really relevant because it's the amount of consecutive e-mails.
Am I completely wrong? I could also just send all contestants one generic e-mail saying their starting time has been updated with a link to the contest page, but that feels weak.
Thanks in advance