2009-11-26 5 views
0

Symfony 1.3에서 Swift Mailer 플러그인을 사용하는 구문은 무엇입니까?Symfony 1.3에서 Swift Mailer AntiFlood 플러그인 또는 Throttler 플러그인 사용

아니고는 :

$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)); 

답변

1

당신은 시도 않았다

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

OR :

$this->getMailer()->registerPlugin($pluginInstance); 
관련 문제