Typo3 10.4.16 SMTP error (Expected response code "250" but got code "451") while sending form

Hi there,

I receive an error while sending a contact form using SMTP on a Typo3 10.4.16. The “Test Mail Setup” in the backend sends correctly, but once I start using a form, I receive the following error:

Expected response code “250” but got code “451”, with message “451 4.3.0 pymilter: untrapped exception in pythonfilter”.

I use the following Mail Setup:

    'format' => 'html',
    'transport' => 'smtp',
    'transport_sendmail_command' => '',
    'transport_smtp_encrypt' => true,
    'transport_smtp_password' => '****',
    'transport_smtp_server' => '****.netcup.net:465',
    'transport_smtp_username' => '****@****.cloud',

The test mail is delivered w/o any problem. What do I miss here?

Thanks for hints