Reputation: 4896
What is the syntax for the using Swift Mailer Plugins in Symfony 1.3?
Its not:
$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));
Upvotes: 0
Views: 1470
Reputation: 60413
did you try:
$this->getMailer()->getRealtimeTransport()->registerPlugin($pluginInstance);
OR:
$this->getMailer()->registerPlugin($pluginInstance);
Upvotes: 1