Contao > 4.3 sending emails with sendmail throw error on some providers

  contao, swiftmailer, symfony

Older Versions of Contao (till 4.3) working like expected with sending emails via sendmail.
After upgrade to Contao 4.9 I got some errors at Providers like 1u1 / ionos or mittwald.

The error in the logs sound like:

"Expected response code 220 but got an empty response"

Sending Mails from CLI of the Server (means if logged in via SSH) working like expected:sendmail test" |

/usr/sbin/sendmail -t -v -f [email protected] [email protected]

Source: Symfony Questions