The SwiftmailerBundle, that manages the mailer configuration, allows you to setup only one default configuration. However it's pretty straightforward to setup anothers. Just use the Swiftmailer directly or define you own mailer classes with other configurations.
/**
* Gets the 'mailer' service.
*
* This service is shared.
* This method always returns the same instance of the service.
*
* @return Swift_Mailer A Swift_Mailer instance.
*/
protected function getMailerService()
{
return $this->services['mailer'] = new \Swift_Mailer($this->get('swiftmailer.transport'));
}
You can defined as many services, with different configuration, as you want. For exemplo, look the following example.
<service id="mysecond.transport.smtp" class="%swiftmailer.transport.smtp.class%" public="false">
<argument type="service" id="swiftmailer.transport.buffer" />
<argument type="collection">
<argument type="service" id="swiftmailer.transport.authhandler" />
</argument>
<argument type="service" id="swiftmailer.transport.eventdispatcher" />
<call method="setHost"><argument>%mysecond.transport.smtp.host%</argument></call>
<call method="setPort"><argument>%mysecond.transport.smtp.port%</argument></call>
<call method="setEncryption"><argument>%mysecond.transport.smtp.encryption%</argument></call>
<call method="setUsername"><argument>%mysecond.transport.smtp.username%</argument></call>
<call method="setPassword"><argument>%mysecond.transport.smtp.password%</argument></call>
<call method="setAuthMode"><argument>%mysecond.transport.smtp.auth_mode%</argument></call>
<call method="setTimeout"><argument>%mysecond.transport.smtp.timeout%</argument></call>
<call method="setSourceIp"><argument>%mysecond.transport.smtp.source_ip%</argument></call>
</service>
Then, in your code, you would do something like.
$mySecondMailer = new \Swift_Mailer($this->get('mysecond.transport.smtp'));
That should do the trick.