title: How do I inject different SwiftMailer mailers into different services in Symfony?
body: <p>I have a Symfony 2.8 project that requires usage of two separate mailing services (eg. Google SMTP and Yahoo SMTP). I have configured them according to the docs:</p>
  
  <pre><code>swiftmailer:
      default_mailer: mailer_google
      mailers:
          mailer_google:
              transport: smtp
              host: %mailer_google_host%
              port: %mailer_google_port%
              encryption: tls
              username: %mailer_google_username%
              password: %mailer_google_password%
          mailer_yahoo:
              transport: smtp
              host: %mailer_yahoo_host%
              port: %mailer_yahoo_port%
              encryption: tls
              username: %mailer_yahoo_username%
              password: %mailer_yahoo_password%
  </code></pre>
  
  <p><em>The values for the <code>%variables%</code> are all defined in <code>parameters.yml</code>, which are not relevant here.</em></p>
  
  <p>I'm trying to use a custom Mailer class which is used to define two different services, like this:</p>
  
  <pre><code>aalaap.services.mailer_google:
      class: Aalaap\AppBundle\Services\Mail\Mailer
      arguments:
        - @mailer
        - '%mailer_google_sender%'
  
  aalaap.services.mailer_yahoo:
      class: Aalaap\AppBundle\Services\Mail\Mailer
      arguments:
        - @mailer_yahoo
        - '%mailer_yahoo_sender%'
  </code></pre>
  
  <p>Now, because the default mailer is set to <code>mailer_google</code>, in the first service definition, only specifying <code>@mailer</code> works fine. However, the second service can't find <code>@mailer_yahoo</code>.</p>
  
  <blockquote>
    <p>ServiceNotFoundException in CheckExceptionOnInvalidReferenceBehaviorPass.php line 58:
    The service "aalaap.services.mailer_yahoo" has a dependency on a non-existent service "mailer_yahoo".</p>
  </blockquote>
  
  <p>I've tried it with <code>@mailer.mailer_yahoo</code>, but that doesn't work either. If I change the first service definition to use the specific <code>@mailer_google</code> instead of just the default <code>@mailer</code>, that doesn't work either. No luck with <code>@swiftmailer.mailers.mailer_yahoo</code>.</p>
  
  <p>How do I inject the second (or non-default) mailer into a service?</p>