Use email behind a proxy server

Hi everyone

I have configured Nextcloud to use a proxy server (set the settings in config.php) but was wondering about the mail settings. I cannot seem to get the email configured, and wondering whether it pertains to the server needing a proxy server for internet?

The error I keep getting is

It may or may not be related to the proxy server.
Any ideas?

You have a single space in front of your email address. That’s not allowed.

Just saw it, thanks, but now I have this:

This seems to be network-related. May this be because of the proxy?

I solved this with lots of trickery in my routing tables and internet sharing by other hosts. Nextcloud now “thinks” it does not go through a proxy, but it still does. Sorry for anyone coming here asking the same question, as this does not answer it appropriately.