Mail not working error (ec=56)

Sorry for my english because it’s not the best but i will try to explain me.

I’m trying to set up my email configuration but it always fail with the error “Failure when receiving data from the peer(ec=56), response reading failed” when i try to test it.
My configuration is:

Mail server name: smtp.XXXX.es
Mail server port: 465 in my case
Mail server username (empty for none): XXX@XXX.com
Mail server password: XXXXX
Sender E-Mail Address: XXX@XXX.com
Send mails only with SSL/TLS: Checked/Unchecked I tried all the variables
Check SSL/TLS certificate: Checked/Unchecked I tried all the variables

And it always return me the same error i don’t know what to do i red all the other posts and nothing helped me.

It seems I have the same issue - urbackup gives me:
Failure when receiving data from the peer(ec=56), response reading failed

And curl is working fine:
curl --url ‘smtps://SOMESERVER.YEAH:465’ --ssl-reqd --mail-from ‘SOMEUSER@SOMESERVER.YEAH’ --mail-rcpt ‘DIFFERENTUSER@SOMESERVER.YEAH’ --upload-file mail.txt --user ‘SOMEUSER@SOMESERVER.YEAH:SOMEPASSWORD’ --insecure
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 136 0 0 100 136 0 221 --:–:-- --:–:-- --:–:-- 221

mail.txt:
From: “TestReport” SOMEUSER@SOMESERVER.YEAH
To: “John Testing” DIFFERENTUSER@SOMESERVER.YEAH
Subject: Test

Hi Report,
ignore this test.
Bye!