title: Symfony2 + swift mailer + command : email body displayed into the console
body: <p>I have created <strong>a new command</strong> into my Symfony app.</p>
  
  <p>In this command I call to a service which <strong>send email</strong> <em>as mailer from FOS bundle</em>.</p>
  
  <p>My problem is that the <strong>email body is displayed</strong> into the console in order to send the email.</p>
  
  <p>I want to say that the <code>msg mailer</code> method <strong>works fine out of</strong> the command.</p>
  
  <p><strong>Here my command</strong>:</p>
  
  <pre><code>class ReminderCommand extends Command
  {
      protected function execute(InputInterface $input, OutputInterface $output)
      {
          $this-&gt;container = $this-&gt;getApplication()-&gt;getKernel()-&gt;getContainer();            
  
          # the mailer service works fine out the command
          $mailer = $this-&gt;container-&gt;get('mailer');
          $mailer-&gt;sendMsg(...);          
  
  
          $text = ' =&gt; mail sent';
  
          $output-&gt;writeln($text);
      }
  }
  </code></pre>
  
  <p>Please help</p>
  
  <p>Thanks </p>
  
  <p>Sam</p>