AxiosError: Request failed with status code 400

I have solved my question. If the problem occurs, you can try the following methods to solve it:

  1. Manually configure the email server:
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_smtphost' => 'smtp.mydomain.com',
'mail_smtpauth' => 1,
'mail_smtpport' => '587',
'mail_from_address' => 'noreply',
'mail_domain' => 'mydomain.com',
'mail_smtptimeout' => 30,
'mail_smtpname' => ' user@smtphost.com ',
'mail_smtppassword' => 'supersecretpassword',

Note that it is necessary to add the configuration of ‘mail_stmtptimeout’=>30.

  1. At this point, if the newly created email server of NextCloud application still reports an Ajax error, the email transmission will fail. The reason is that the ‘admin’ account has not been configured with * * personal email * *. I speculate that the failure occurred because the personal email was not configured, and even if the email server was successfully configured, there was no target email address for testing.
    PS: I think this is a bug. The application should remind users that ‘your personal email has not been configured yet’ instead of causing us trouble. ‘Why does it still report an error when I have configured the correct email address?’`
5 Likes