protected function bootSwiftmailer()
    {
        $this->register(new \Silex\Provider\SwiftmailerServiceProvider(), array(
                'swiftmailer.use_spool' => false,
                'swiftmailer.options' => array(
                        'host' => $this['smtp.host'],
                        'port' => $this['smtp.port'],
                        'username' => $this['smtp.username'],
                        'password' => $this['smtp.password'],
                        'encryption' => $this['smtp.encryption'],
                        'auth_mode' => $this['smtp.auth_mode']
                    )
            ));
    }