Lamp - PHP mailer not working after last lamp and mail apps update

Hi,
I am developing another web application, this time on the NS8 Webserver app, and I am getting the same problem, as was resolved with the LAMP app earlier.

SMTP Error: Could not connect to SMTP host. Failed to connect to server SMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused

The PHP Mailer settings within the Webserver app are practically the same

  `$mail->isSMTP();`

$mail->Host = <ns8 Mail server hostname FQDN>;
$mail->SMTPAuth = true;
$mail->Username = 'XXX';
$mail->Password = 'XXX';
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;

Thank you for any suggestions

This is an output of connection I have tried from within the webserver container:

[webserver1@hur state]$ openssl s_client -connect hur.twr.cz:587 -starttls smtp
Connecting to 127.0.1.1
CONNECTED(00000003)
depth=2 C=US, O=Internet Security Research Group, CN=ISRG Root X1
verify return:1
depth=1 C=US, O=Let’s Encrypt, CN=R13
verify return:1
depth=0 CN=hur.twr.cz
verify return:1

Certificate chain
0 s:CN=hur.twr.cz
i:C=US, O=Let’s Encrypt, CN=R13
a:PKEY: RSA, 4096 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Dec 24 19:19:39 2025 GMT; NotAfter: Mar 24 19:19:38 2026 GMT
1 s:C=US, O=Let’s Encrypt, CN=R13
i:C=US, O=Internet Security Research Group, CN=ISRG Root X1
a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Mar 13 00:00:00 2024 GMT; NotAfter: Mar 12 23:59:59 2027 GMT

Server certificate
-----BEGIN CERTIFICATE-----
…
-----END CERTIFICATE-----
subject=CN=hur.twr.cz
issuer=C=US, O=Let’s Encrypt, CN=R13

No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits

SSL handshake has read 3990 bytes and written 437 bytes
Verification: OK

New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Protocol: TLSv1.3
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)

250 CHUNKING

Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol  : TLSv1.3
Cipher    : TLS_AES_256_GCM_SHA384
Session-ID: …
Session-ID-ctx:
Resumption PSK: …
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
…

Start Time: 1770370457
Timeout   : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
Max Early Data: 0




read R BLOCK