Hi everyone, I’m trying to configure an email address that Nextcloud can use to send notifications, but I’m running into a problem.
I’ve filled in all the required fields in the email settings UI (screenshot attached), but when I try to send a test email, I receive the following error:
AxiosError: Request failed with status code 400
To rule out network or connectivity issues, I ran a few tests via CLI on the Nextcloud server. Here are some details:
Maybe the issue is the OAuth2 authentication method required by Microsoft .. I read that NextCloud doesn’t support it yet. What do you think guys? Are there other solutions? Maybe I can change provider ..
Yeah, I think the issue is the OAuth2 authentication method required by Microsoft not supported by NextCloud. I just switched to Google and with GMAIL it worked, but keep in mind that you have to create an App password as described here by Google documentation:
You may want to consider utilizing an ESP’s SMTP services rather than the SMTP services intended to be used with standalone email client apps.
The OAuth 2.0 trend is for the latter.
App passwords are discouraged by Google (but still supported at the moment if you enable 2FA) and completely deprecated by Microsoft. Also app passwords are revoked when your main password is changed.
The other thing using an ESP avoids is volume limits, policy violation issues, etc.
ESPs tend to use long strong API keys for the SMTP “username/password” on the SMTP side And know how to support web apps because that’s their business. As a result, ESPs are much more likely to be compatible with web apps like Nextcloud Server.
For small volumes many ESPs have free levels so there’s really no downside either.
I’ve had many years of excellent results with the ESP Mailgun myself (in my home/SMB and with some low volume clients), but that’s just anecdotal. There are many well established ESPs. Others that I’ve also used with success are AWS SES (more enterprise-y) and Twilio Sendgrid.