Version: 25.04.2.6
I have a personal Outlook account (not MS365), and set up email alerts with Outlook OAuth per instructions from the 25.04 TrueNAS documentation. After going through the OAuth flow i get the expected “Outlook Credentials Have been Saved” message and it appears the the OAuth credentials are saved, as i don’t see any error messages in the middleware log after i re-do the OAuth flow. When i try to send a test email via the General Settings > Email window i get this:
Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/plugins/mail.py", line 370, in send_raw
with self._get_smtp_server(config, message['timeout'], local_hostname=local_hostname) as server:
File "/usr/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/mail.py", line 426, in _get_smtp_server
self.middleware.call_sync('mail.outlook_xoauth2', server, config)
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1041, in call_sync
return methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/mail_/outlook.py", line 47, in outlook_xoauth2
raise CallError("Outlook XOAUTH2 failed: %r %r" % (code, response))
middlewared.service_exception.CallError: [EFAULT] Outlook XOAUTH2 failed: 535 b'5.7.3 Authentication unsuccessful [DM6PR03CA0092.namprd03.prod.outlook.com 2026-09-06T20:25:48.958Z 08DF0B5C3B46EB44]'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 515, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 562, in __run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 627, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 624, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 178, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 52, in nf
res = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/mail.py", line 261, in send
return self.send_raw(job, message, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 178, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/mail.py", line 395, in send_raw
raise CallError(f'Failed to send email: {e}')
middlewared.service_exception.CallError: [EFAULT] Failed to send email: [EFAULT] Outlook XOAUTH2 failed: 535 b'5.7.3 Authentication unsuccessful [DM6PR03CA0092.namprd03.prod.outlook.com 2026-09-06T20:25:48.958Z 08DF0B5C3B46EB44]'