title: Disable swiftmailer spool in Symfony per environment
body: <p>I having trouble send bulk emails with symfony2 via console command. I want to disable the mail spooling complete for the env the console is running in but keep it working for the default env. So I have this in config.yml:</p>
  
  <pre><code>swiftmailer:
      transport: %mailer_transport%
      host:      %mailer_host%
      port:      %mailer_port%
      username:  %mailer_user%
      password:  %mailer_password%
      spool:     %mailer_spool_type%
  </code></pre>
  
  <p>and then each env has it's on parameters like parameters_prod.yml:</p>
  
  <pre><code>parameters:
      mailer_transport:       smtp
      mailer_host:            smtp.someserver.net
      mailer_port:            587
      mailer_user:            "someuser"
      mailer_password:        "somepassword"
      mailer_spool_type:      { type:memory }
  </code></pre>
  
  <p>then for the console env I use parameters_cron.yml:</p>
  
  <pre><code>parameters:    
      mailer_spool_type: ~
  </code></pre>
  
  <p>The problem is using <code>~</code> or <code>null</code> doesn't actually turn off the spool but it uses the default values of <code>{cache: file, path: %kernel.cache_dir%/swiftmailer/spool }</code></p>
  
  <p>Is there a way to disable the spool just by changing the parameters or is there a better way?</p>