0
Using swiftmailer and throttler to send emails, the problem is that the browser timeouts because the throttler pauses to keep sending within limits (5 emails per minute), I think the script keeps running, is that a problem? there is a way to avoid timeout ?
// Use AntiFlood to re-connect after 100 emails
$mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(50));
// And specify a time in seconds to pause for (30 secs)
$mailer->registerPlugin(new Swift_Plugins_AntiFloodPlugin(50, 30));
// Rate limit to 100 emails per-minute
$mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin(
5, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
));
// Rate limit to 10MB per-minute
$mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin(
1024 * 1024 * 10, Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE
Already check the timeout time in php.ini ? Or tried using the function
set_time_limit(0);
?– Guilherme Lopes
yes I’ve tried that ! the timeout in php.ini is general and as the script takes many breaks I wouldn’t like to go there ...
– I-am Sam
You can set by code also with
ini_set('max_execution_time', 0);
making there is no limit– Guilherme Lopes
I tried but with no result. timeout anyway
– I-am Sam
The ini_set function, defines the value of a configuration, with it, you can change the configuration by code
– Guilherme Lopes
Thanks William Herme...I tried that in the script but did timeout on the table
– I-am Sam
Tb increased maxexectime in Cpanel but tb gave timeout
– I-am Sam