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:
Uncaught PHP Exception Swift_TransportException: "Connection could not be established with host localhost [Connection timed out # 110].
I want the emails to send directly so I commented on the content of the swiftmailer.yaml
#swiftmailer:
# ...
# spool: { type: memory }
#.env
# APP_ENV=prod
# MAILER_URL=smtp://imap.ionos.fr:993?encryption=ssl&auth_mode=login&username=mail&password=passwordmail
#Controller
# $message = (new \Swift_Message('Youpi Email'))
# ->setFrom(mail)
# ->setTo('mail@gmail.com')
# ->setBody($params['message'],'text/plain')
# $this->get('mailer')->send($message);
IONOS email configuration is here :
Thank you a lot for your responses !