After upgrade to V14 getting error Invalid Outgoing Mail Server or Port

I have tried both Gmail and Microsoft. Both were working in V13 but after upgrade outgoing emails have stopped. I have used following link to setup microsoft email

Office 365 settings - Frappe Framework - Frappe Forum

Can anybody suggest how to do this?
Thanks in advance.

Is your scheduler running?

Look for email queue list in awesome bar

Checked Email queue, it shows Error.

I have also tried with OAuth. The Connected app is working and getting the required tokens. But when I press Authorize API access for the email account. It throws following error after the Microsoft signup window:

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1607, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/integrations/doctype/connected_app/connected_app.py”, line 149, in callback
frappe.throw(_(“Invalid state.”))
File “apps/frappe/frappe/init.py”, line 525, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Invalid state.

Please can somebody help with this error.

Can somebody suggest what should be the scope for email default sending account. I am using folllowing scopes:
https://outlook.office.com/IMAP.AccessAsUser.All
https://outlook.office.com/SMTP.Send
offline_access

Thanks

I wonder why the basic authentication with m365 ( with connector, ip address) which was working in v13 throws an error in v14 as:

Invalid outgoing mail server or port

Can somebody check and see if this is caused by some validation script which is not allowing the unusual smtp server as :

yourdomain-com.mail.protection.outlook.com
Port 25

The above configuration with basic authentication is working in v13 till date but same configuration fails in v14. We are currently running two droplets one with v13 which is used by our organization and another upgraded to v14 which is under trials before the switchover. Hope this resolves soon as without this we would be stuck at v13.

Thanks in advance

Hi,

A different port has been tried?

https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040