Mail App login to imaps

I’m experiencing a strange issue in the mail app.

I am not able to login to my IMAPS email from using the Mail app.
I am able to connect using ‘security None’. Using tls or ssl. It gives the error ’ IMAP username or password is wrong’.

The ports are correct, I am able to sendmail from nextcloud and can send / receive from snappymail, and other apps with the same ssl/tls settings.

The only difference I see from this and other mail accounts is the url scheme on

The imap address format is (changed for privacy)

I’ve searched for answers but have come up empty. Any thoughts or suggestions?

You can try the suggestions in mail/doc/ at main · nextcloud/mail · GitHub and acquire more logs

Was ever any resolution of this matter. I also have a “full-service” email account at and would like to provision my users (just family) with access via Nextcloud mail client to the email accounts they have on Right now they have to use a different client to connect which makes Calendar, among other apps unavailable for shared meetings etc.

I was meaning to dig deeper into the logs but life has gotten in the way. I’m no expert but if I can produce some log errors maybe that can be of use to those who know.
So far no joy with dynu.

Quick update:
I uninstalled the mail app and installed Snappy mail client and the problem persists. There is something ‘beneath’ the mail apps themselves, in the main Nextcloud program which is choking on the dynu format of full service mail server addresses. It seems unable to read the format or unable to pass it along to the server.
I would bet it just may need the appropriate escape characters for php.