Error "no implicit conversion of Integer into String" when testing email

Hello,

I have a fresh installation discourse and when testing the email addres I get error:

Jobs::HandledExceptionWrapper: Wrapped TypeError: no implicit conversion of Integer into String

and in dev tools request “/admin/email/test” is refused with “422 (Unprocessable Content)” error.

The smtp server works fine, I use it in other applications without any problems.

System info:

Discourse ver: 3.4.0.beta2-dev

Linux 6.8.0-1013-oracle aarch64 GNU/Linux

Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

Server smtp logs:

|info|disconnect from unknown[ip redacted] ehlo=2 starttls=1 auth=0/1 commands=3/4
|info|lost connection after AUTH from unknown[ip redacted]|
|info|Anonymous TLS connection established from unknown[ip redacted]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256|
|info|TLS SNI addres redacted from unknown[ip redacted] not matched, using default chain|
|info|connect from unknown[ip redacted]|

Any ideas?