Email configuration smtp doesn't work on 1and1/1und1/ionos hosting, but email app works

I’ve tried everything. Including gmail account instead of my hosted ones.
Absolutely no luck. I even tried installing a new instance of nexcloud.
If I try the above suggestions None for encryption and port 25/465/587 I get a huge list of errors to say encryption is required.
Shame there is no way to put phpmail back.

Just figured it out. Ofcourse as soon as my previous post was done. lol.
I could only use an email account that is on the same server as my nextcloud installation.