title: How to translate emails when sending them asynchronously with Symfony Messenger?
body: <p>I configured the Symfony mailer to send emails with messenger.</p>
  <p><a href="https://symfony.com/doc/current/mailer.html#sending-messages-async" rel="nofollow noreferrer">https://symfony.com/doc/current/mailer.html#sending-messages-async</a></p>
  <p>I have my emails in two languages and I rely on the requests to detect the language, but now the emails are not translated.</p>
  <p>How can I get the messages to be translated in the language detected in the request?</p>
  <p>In my controller:</p>
  <pre><code>$mailer-&gt;send(
              $user-&gt;email,
              $this-&gt;translator-&gt;trans('mails.recover.subject'),
              'email/client/password-recovery.html.twig',
              compact('user', 'hash', 'target')
          );
  </code></pre>
  <p>Template:</p>
  <pre><code>{% extends 'email/base.html.twig' %}
  
  {% block content %}
      &lt;h2&gt;{{ 'mails.recover.header' | trans({'%name%': user.name}) }}&lt;/h2&gt;
  
      &lt;p style=&quot;margin: 25px 0;&quot;&gt;
          {{ 'mails.recover.text1' | trans({'%url%': url('default')}) | raw }}
      &lt;/p&gt;
  
  // More code
  </code></pre>
  <p>Messenger config:</p>
  <pre><code>framework:
      messenger:
          # Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
          # failure_transport: failed
  
          transports:
              # https://symfony.com/doc/current/messenger.html#transport-configuration
              async: '%env(MESSENGER_TRANSPORT_DSN)%'
              # failed: 'doctrine://default?queue_name=failed'
              # sync: 'sync://'
  
          routing:
              # Route your messages to the transports
              # 'App\Message\YourMessage': async
              'Symfony\Component\Mailer\Messenger\SendEmailMessage':  async
  </code></pre>
  <p><em>Looking better the subject of the mail if it is translated correctly, the body of the mail does not</em></p>
  <p>If I remove the line</p>
  <pre><code>'Symfony\Component\Mailer\Messenger\SendEmailMessage':  async
  </code></pre>
  <p>in messegner config, translation work.</p>