Symfony and 1&1 ionos send email with swiftmailer don’t work

Hello i want send email with swiftmailer on my Symfony site deploy on 1&1 ionos. On local my email work but when I change my environment variables MAILER_URL with parameters of 1&1 ionos, it does not work.
I have change my .env file with composer dump-env prod and so I have .env.local.php file. With this I do not need .env file or I need to configure the .env still?

My .env.local.php :


// This file was generated by running "composer dump-env prod"

return array (
  'APP_ENV' => 'prod',
  'APP_SECRET' => '7c9d7fd7335b44c2dced69aba221c4b3',
  'DATABASE_URL' => 'mysql://username:[email protected]&1ionos:3306/dbname',
  'MAILER_URL' => 'smtp://',

the comma at the end of the line for MAILER_URL is not too much?
My swift mailer.yaml :

url: '%env(MAILER_URL)%'
spool: { type: 'memory' }

I use also the urlencode() function for my password.
And 1&1 ionos told me that the syntax of MAILER_URL.
My email 1&1 ionos work because I manage to send me an email on my personal email.

If anyone is using 1 & 1 ionos and knows the correct configuration for the MAILER_URL I am a taker, thank you very much for the help.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *