diff --git a/src/middlewared/middlewared/plugins/mail.py b/src/middlewared/middlewared/plugins/mail.py index 31048fd4ef17c..c2b98ff39919e 100644 --- a/src/middlewared/middlewared/plugins/mail.py +++ b/src/middlewared/middlewared/plugins/mail.py @@ -156,7 +156,7 @@ async def do_update(self, data): 'This field is required when SMTP authentication is enabled', ) - if not new['oauth']: + if not new['oauth'] or new['oauth']['provider'] == 'outlook': if not new['fromemail']: verrors.add('mail_update.fromemail', 'This field is required')