title: Swift Mailer on Symfony 3.4, configuration
body: <p>This is what I see with <code>php bin/console debug:config swiftmailer</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/6qzV7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6qzV7.png" alt="enter image description here"></a></p>
  
  <p>I can send emails with <code>php bin/console swiftmailer:email:send</code> they are sent ok:</p>
  
  <p><a href="https://i.stack.imgur.com/cJgH1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cJgH1.png" alt="enter image description here"></a></p>
  
  <p>Here is the email in my account:</p>
  
  <p><a href="https://i.stack.imgur.com/wzFiC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wzFiC.png" alt="enter image description here"></a></p>
  
  <p>But I can't do it with my controller on Symfony. I have tested many examples, none one works. I have tested on dev and prod enviroment (here mainly, here is where I need it of course). This is an example of my code:</p>
  
  <pre><code>public function sendEmail(Request $request ) {
  
      $message = \Swift_Message::newInstance()
      -&gt;setSubject('Some Subject')
      -&gt;setFrom('example@gmail.com')
      -&gt;setTo('myemail@gmail.com')
      -&gt;setBody('asdas');
  
      $this-&gt;get('mailer')-&gt;send($message);
  
      dump($message);
      die();
  </code></pre>
  
  <p>I can see the full message in the output but no email is sent.</p>
  
  <p>I have tested also this way:</p>
  
  <pre><code>$message = (new \Swift_Message('Wonderful Subject'))
            -&gt;setFrom(['john@doe.com' =&gt; 'John Doe'])
            -&gt;setTo(['myemail@gmail.com' =&gt; 'A name'])
            -&gt;setBody('Here is the message itself');
  
  $this-&gt;get('mailer')-&gt;send($message);
  </code></pre>
  
  <p>Same, nothing happens. What could be wrong?</p>