title: Symfony 1.4.6 loading factories.yml configuration from task
body: <p>I have the following configuration set in my factories.yml file...</p>
  
  <pre><code>all:
    mailer:
      param:
        transport:
          class: Swift_SendmailTransport
          param:
            command: /usr/sbin/sendmail -oi -t
  </code></pre>
  
  <p>...to overcome the 'double dot' issue as described <a href="http://swiftmailer.lighthouseapp.com/projects/21527/tickets/113-quoted-printable-soft-line-breaks-problem" rel="nofollow noreferrer">here</a>.</p>
  
  <p>When I run the following code...</p>
  
  <pre><code>$mailer = $this-&gt;getMailer();
  $message = $mailer-&gt;compose();
  
  $message-&gt;setTo('foo@bar.com');
  $message-&gt;setFrom('foo@bar.com');
  $message-&gt;setSubject('Testing');
  $message-&gt;setBody(
    $mailer-&gt;getRealtimeTransport()-&gt;getCommand(),
    'text/plain'
  );
  
  $mailer-&gt;send($message);
  </code></pre>
  
  <p>...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.</p>
  
  <p>Any ideas why the factories.yml configuration isn't loaded in a symfony task, and how I can go about solving this issue?</p>