Running on NC31, I have the same error message.
My configuration:
‘mail_smtphost’ => ‘localhost’,
‘mail_smtpport’ => ‘25’,
‘mail_smtpsecure’ => ‘’
This should not use TLS, but the Exim4 logfile shows
“TLS error on connection from (domain.com) [127.0.0.1] (gnutls_handshake): Decryption has failed.”
The same local SMTP is configured for the mail app as well, and works there as expected.
LO QUE ME FUNCIONÓ ES: En la página de “información personal” agregué la misma dirección de correo electrónico que usé en la configuración SMTP. En mi caso, esa información estaba en blanco. Al agregarla, el error desapareció y recibí el correo de confirmación.
WHAT WORKED FOR ME IS: On the “personal information” page I added the same email address as the one used in the SMTP configuration. In my case, that information was blank. When I added it, the error disappeared and I received the confirmation email.
I was running into this issue as well, and none of the above helped me. I eventually found out that the email settings I specified in docker-compose.yml were the problem, even though the settings were correct.
If you built your Nextcloud docker instance using docker-compose.yml and you pre-specified your email settings there, try re-building your docker container without them, then manually enter your email settings via the web interface. That (as well as checking everything else specified above) may help your problem.
Hi,
That was the solution for me.
Same email in the fisrt user created personal information and in the Test and verify email settings Send Email.
No config.php modification.
Thank’s and good luck !
Same here, - Fresh install latest 30 version, no any apps add, just fresh install and fix all what i find in admin page, - i try all solutions, i use - ‘mail_smtptimeout’ => 30,, yes i put mail adress to admin account, still same, i try port 25 , i try 587, i copy from config.php - mail settings from my old still working nextcloud 28. Still! Not working and get this - AxiosError: Request failed with status code 400 nextcloud. Please Nextcloud team, can You check this?? My setup - Almalinux server 9.5, Postgresql 16, php 8.3, mail server Exchange 2019- All fine exept mail settings. And what i see people have same problems wit Debian linux systems
None of these solutions worked for me aswell. It only works when I turn off authorization. Until I upgraded to NC28 I had no issues with notifications. I also tried fresh install on Debian12 with NC31 and it doesn’t work. IMHO NC has a problem when trying to authorize on some SMTP servers (I’ve tried Postfix and Exchange).
This ended up being my issue! Added the email address to my admin user and it resolved the 400 error and the test email was successfully sent. No manual configuration needed.
Yes, that’s correct. So for the from address I used an info alias that I have set up. For the login however, I used the primary email address on the account along with an app password rather than my email account password.
So to recap:
Admin email = info alias
SMTP from email = info alias
STMP login = email account login with app password for additional security
The settings in config.php are correct. To send a testmail there must be a email adres voor the administrator. otherwise there is no FROM: Adres. So check if the e-mail adres is inserted in the personal settings of Administrator. This was the problem for me, hope this helps
I had the same problem over 2 months and I could finally fix it myself. Maybe it is the solution for someone else aswell
I tried to telnet to my M365 Server and noticed that it went via IPv6 instad of IPv4.
So I deactivated IPv6 on my Ubuntu Server and the test mail worked instantly.
To deactivate IPv6 on a Linux Ubuntu server i did the following:
Move to /etc/sysctl.conf
Set these 3:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
It took me several hours to investigate the issue before I realized that the master account had not yet set an email address. However, the Nextcloud system did not return any useful information.