To define any additional parameters that you need, define them in the config.yml file. Sort of:
Then you can get them anywhere the service container is available, for example inside the controller, just like you retrieve any other service, such as a doctrine or swiftmailer. For example, in the do controller
$transport = $this->get('my_mailer.transport');
If you want, you can define these parameters in paramters.ini, you will get the same result.
source share