Использование плагина Swift Mailer AntiFlood или плагина Throttler с Symfony 1.3

StackOverflow https://stackoverflow.com/questions/1801305

  •  05-07-2019
  •  | 
  •  

Вопрос

Каков синтаксис использования плагинов Swift Mailer в Symfony 1.3?

Это не:

$email = $this->getMailer()->compose();
$email->setSubject($subject);
$email->setFrom($from);
$email->setTo($to);
$email->setBody($body, 'text/html');
$email->addPart($plain, 'text/plain');
$email->registerPlugin(new Swift_Plugins_AntiFloodPlugin(100, 30));
$email->registerPlugin(new Swift_Plugins_ThrottlerPlugin(100, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE));
Это было полезно?

Решение

ты пробовал:

$this->getMailer()->getRealtimeTransport()->registerPlugin($pluginInstance);

ИЛИ:

$this->getMailer()->registerPlugin($pluginInstance);
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top