Self-hosted Bitwarden instance cannot send mails via Microsoft 365

Hello all,

I can’t manage to send mails through my self-hosted Bitwarden for days. Other topics here in the forum always refer only to Gmail, I use Office 365. Here is my configuration:

9 globalSettings__yubico__clientId=REPLACE
10 globalSettings__yubico__key=REPLACE
11 globalSettings__mail__replyToEmail=service@mycompany(.)onmicrosoft(.)com
12 globalSettings__mail__smtp__host=smtp(.)office365(.)com
13 globalSettings__mail__smtp__port=587
14 globalSettings__mail__smtp__ssl=false
15 globalSettings__mail__smtp__username=service@mycompany(.)onmicrosoft(.)com
16 globalSettings__mail__smtp__password=password
17 globalSettings__disableUserRegistration=false
18 globalSettings__hibpApiKey=REPLACE
19 adminSettings__admins=

The user data is correct, I have checked it. This data also works with other applications I host, so I’m a bit stumped right now. Is there maybe a folder with logs somewhere or does anyone have another idea?

EDIT: I am a new user, so I had to make brackets () around the dots in the details. The entries are of course without the brackets.

Hello @networker and welcome to the community,

Did you perhaps try to run ./bitwarden.sh restart after changing your SMTP details?

Has your company enabled SMTP AUTH for mail sent via its servers? If not, that may be the issue, as Bitwarden does not support OAuth2.

Thank you for the quick answers. I have rebuilt and restarted ./Bitwarden.sh after making changes to the file. I have also looked at the SMTP Auth options, all services are activated for the mailbox service (OWA, MAPI, Exchange Web Services, ActiveSync, IMAP, POP, Auth SMTP).
I have also entered my personal account in the settings (E5), SMTP Auth is also activated here. I created an app password (The service account is used without an app password) for the application, entered it and then rebuilt and restarted it. It takes a moment (about 2-3 seconds) until the error message “unhandeled server error” appears via the Bitwarden web interface.