Configure email server AxiosError: Request failed with status code 400

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.4
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache latest
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Sophia UTM
  • PHP version (e.g, 8.3):
    • 8.3.6
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Since the begining
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Ubuntu + install php nextcloud files
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Trying to configure the emails to receive the notifications

Steps to replicate it (hint: details matter!):

Enter all informations about mail server
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtphost’ => ‘mailserver.mydomain.com’,
‘mail_from_address’ => ‘service’,
‘mail_domain’ => ‘mydomain.com’,
‘mail_smtptimeout’ => 30,
‘mail_smtpdebug’ => true,
‘mail_smtpport’ => ‘465’,
‘mail_sendmailmode’ => ‘pipe’,
‘mail_smtpauth’ => true,
‘mail_smtpname’ => ‘mailbox_login’,
‘mail_smtppassword’ => ‘mailbox_password’,

Log entries

Where do I find them in Netxcloud ?
Nextcloud ip is 192.168.10.17

In the mail server I get these logs :slight_smile:

11/05/2025 16:56:38 info disconnect from unknown[192.168.10.17] commands=0/0
11/05/2025 16:56:38 info lost connection after CONNECT from unknown[192.168.10.17]
11/05/2025 16:56:38 info Anonymous TLS connection established from unknown[192.168.10.17]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
11/05/2025 16:56:38 info TLS SNI MyServer.mydomain.com from unknown[192.168.10.17] not matched, using default chain
11/05/2025 16:56:38 info connect from unknown[192.168.10.17]

Other servers are sending emails without problem.

Nextcloud

Nothing in the logs

Thanks