Symfony 1.4.6 loading factories.yml configuration from task

Bliblibli

New Member
I have the following configuration set in my factories.yml file...\[code\]all: mailer: param: transport: class: Swift_SendmailTransport param: command: /usr/sbin/sendmail -oi -t\[/code\]...to overcome the 'double dot' issue as described here.When I run the following code...\[code\]$mailer = $this->getMailer();$message = $mailer->compose();$message->setTo('[email protected]');$message->setFrom('[email protected]');$message->setSubject('Testing');$message->setBody( $mailer->getRealtimeTransport()->getCommand(), 'text/plain');$mailer->send($message);\[/code\]...inside an action everything works as expected. But when I run the same code from inside a task, I get a fatal error - \[code\]PHP Fatal error: Call to undefined method getCommand\[/code\] - because SwiftMailer is using the default transport class and not the \[code\]Swift_SendmailTransport\[/code\] class as specified in the factories.yml configuration.Any ideas why the factories.yml configuration isn't loaded in a symfony task, and how I can go about solving this issue?
 
Back
Top