title: SwiftMailer can not send TemplatedEmail , symfony 4
body: <p>here is what swiftmailer says, despite the symfony 4 docs saying we cound send such TemplatedEmail object, it is not possible:</p>
  
  <blockquote>
    <p>Argument 1 passed to Swift_Mailer::send() must be an instance of
    Swift_Mime_SimpleMessage, instance of
    Symfony\Bridge\Twig\Mime\TemplatedEmail given, called in
    /home/tk/html/src/Service/MailService.php on line 103</p>
  </blockquote>
  
  <p>code to send my html mail inside my MailService:</p>
  
  <pre><code>// ...
  use Swift_Mailer;
  use Symfony\Bridge\Twig\Mime\TemplatedEmail;
  
  class MailService {
  
  // ...
  
  public function sendOwnerPollsAction( Owner $foundOwner ) {
  
          // anti spam , limit to every minute TODO
  //      $lastSend = $admin_user-&gt;getRequestedPollsDate();
  //      $now      = new \DateTime();
  
  //      if ( date_diff( $lastSend, $now ) &lt; 60 ) {
  //          // too soon!
  //          die( 'too soon!' );
  //      }
  //      $admin_user-&gt;setRequestedPollsDate( $now );
  //      $em-&gt;persist( $admin_user );
  //      $em-&gt;flush();
          $titleEmail = 'Framadate | Mes sondages';
  
          $templateVars = [
              'owner'          =&gt; $foundOwner,
              'title'          =&gt; $titleEmail,
              'email_template' =&gt; 'emails/owner-list.html.twig',
          ];
  
          $email = ( new TemplatedEmail() )
              -&gt;from( 'ne-pas-repondre@framadate-api.cipherbliss.com' )
              -&gt;to( new Address( $foundOwner-&gt;getEmail() ) )
              -&gt;subject( $titleEmail )
              -&gt;htmlTemplate( $templateVars[ 'email_template' ] )
              -&gt;context( $templateVars );
  
          // send email
          return $this-&gt;mailer-&gt;send( $email );
      }
  </code></pre>
  
  <p>the swiftmailer doc for symfony 4 says we can send mails like that, and that templatedemail extend Email.
  <a href="https://symfony.com/doc/4.3/mailer.html#creating-sending-messages" rel="nofollow noreferrer">https://symfony.com/doc/4.3/mailer.html#creating-sending-messages</a>
  so i don't get how we could send templated html emails.</p>
  
  <p>packages:</p>
  
  <pre><code>"symfony/framework-bundle": "4.3.*",
  "symfony/swiftmailer-bundle": "^3.4",
  "php": "^7.1.3",
  </code></pre>