title: Symfony swiftmailer in production environment
body: <p>I have a problem for sending mails with Swiftmailer in Symfony2.
  Let me explain it: when I go to my website with the app_dev.php, I could send messages, there is no problem (also, when I write <code>$kernel = new AppKernel('prod', true);</code> in app.php).</p>
  
  <p>So, I don't understand why this works in dev and not in prod.</p>
  
  <p>Here is my configuration files:</p>
  
  <p>parameters.yml:</p>
  
  <pre><code>mailer_transport: smtp
  mailer_host: ****.ovh.net
  mailer_username: postmaster@mywebsite.com
  mailer_password: ****
  mailer_port: ****
  </code></pre>
  
  <p>config.yml:</p>
  
  <pre><code>swiftmailer:
  transport: "%mailer_transport%"
  host:      "%mailer_host%"
  username:  "%mailer_username%"
  password:  "%mailer_password%"
  port:      "%mailer_port%"
  spool:     { type: memory }
  </code></pre>
  
  <p>And this is the php code, but I think there is no problem with it because as I said there is no problem in dev mode.</p>
  
  <pre><code>$message = \Swift_Message::newInstance() -&gt; setSubject('Test')
           -&gt; setFrom('postmaster@mywebsite.com')
           -&gt; setTo($user -&gt; getMail())
           -&gt; setBody('Test');
  $this -&gt; get('mailer') -&gt; send($message);
  </code></pre>
  
  <p>Thank you very much if you know where is the problem.</p>