Smtp error on wordpress

Hello, I can’t fix it no matter what I did.
Where do you think is the problem?

Versions:
WordPress: 6.1
WordPress MS: No
PHP: 7.3.12
WP Mail SMTP: 3.6.1

Params:
Mailer: smtp
Constants: No
ErrorInfo: SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused
Host: mail.kemaltekin.net
Port: 465
SMTPSecure: ssl
SMTPAutoTLS: bool(true)
SMTPAuth: bool(true)

Server:
OpenSSL: OpenSSL 1.0.2k 26 Jan 2017
Apache.mod_security: No

Debug:
Email Source: WP Mail SMTP
Mailer: Other SMTP
SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused

SMTP Debug:
2022-11-05 16:48:52 Connection: opening to ssl://mail.kemaltekin.net:465, timeout=300, options=array()

2022-11-05 16:48:52 Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://mail.kemaltekin.net:465 (Connection refused) [/home/kemalltekin.net/public_html/wp-includes/PHPMailer/SMTP.php line 389]

2022-11-05 16:48:52 SMTP ERROR: Failed to connect to server: Connection refused (111)

SMTP Error: Could not connect to SMTP host. Failed to connect to server

Welcome @maxwell Happy you are here

verify the validity of mail server’s SSL certificate: openssl s_client -connect mail.kemaltekin.net:25 -starttls smtp

change connecting ports:

Confirm your ports here https://SERVER_URL/email/listEmails → Choose kemaltekin.net NOT mail.kemaltekin.net look for Details To Configure Mail Clients e.g.

SMTP Details
Server Hostname mail.kemaltekin.net
Port 25
Port 587 (SSL)
Port 465 (SSL)
SSL STARTTLS

SSL is working and all my settings are correct but I can’t use it on wordpress

SMTP Details
Server Hostname mail.kemaltekin.net
Port 25
Port 587 (SSL)
Port 465 (SSL)
SSL STARTTLS

I installed the gmail smtp plugin and it works fine.

Ok good. Maybe wrong SMTP authentication details on your plugin. Test that out by changing password if you are at liberty to

How can I be sure that port 465 is working?

firewall-cmd --zone=public --permanent --add-port=465/tcp
FirewallD is not running

I ruled out firewall issues because you said here

it works in other ways unless you changed something after that test

Try NON-ssl ports thats a starting point

Thank you for your attention @josephgodwinke, I will switch to another panel, unfortunately, the cyberpanel is very inadequate and everything is charged.