Nextcloud mails sent by the Office365 SMTP server are reported as junk

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


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:

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): Docker
Apache or nginx version (eg, Apache 2.4.25): Docker
PHP version (eg, 7.4): 7.4

The issue you are facing: mail

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Sent mail to office365 address, using office365 smtp server
  2. Check the mail
  3. It is classified as junk. gmail or other mail service is not.

Mail headers could give you an advice… otherwise it’s better to reach out to Microsoft Support and ask them what is the reason…