title: Symfony 4 - Send Mail with ionos
body: <p>For several hours, I can not send mail with Symfony 4. Currently, I am hosted at IONOS and I wish to send emails through my email present in the host. Symfony is sending me the following error: </p>
  
  <blockquote>
    <p>Uncaught PHP Exception Swift_TransportException: "Connection could not be established with host localhost [Connection timed out # 110].</p>
  </blockquote>
  
  <p>I want the emails to send directly so I commented on the content of the <code>swiftmailer.yaml</code></p>
  
  <pre><code>#swiftmailer:
      # ...
      # spool: { type: memory }
  
  #.env
      # APP_ENV=prod
      # MAILER_URL=smtp://imap.ionos.fr:993?encryption=ssl&amp;auth_mode=login&amp;username=mail&amp;password=passwordmail
  
  
  #Controller
      # $message = (new \Swift_Message('Youpi Email'))
      # -&gt;setFrom(mail)
      # -&gt;setTo('mail@gmail.com')
      # -&gt;setBody($params['message'],'text/plain')
      # $this-&gt;get('mailer')-&gt;send($message);
  </code></pre>
  
  <p>IONOS email configuration is here : </p>
  
  <p><a href="https://i.stack.imgur.com/hyaLF.png" rel="nofollow noreferrer">Mail configuration IONOS</a></p>
  
  <p>Thank you a lot for your responses !</p>