Yes,
so first I created a M365 user with the email address that I am interested to use as a default sending email in ERPNext. Then I created a user with the same email address in ERPNext. On logging in as this user I went to the conneted app and used the Connect to M365 (name of app). It asked me to log into the M365 account, I successfully logged into the account.
Then I created the email address for the same user but it gives the above error.
Thanks for this in-depth tutorial! It sums up perfectly what I found out by searching multiple threads and issues. The official documentation on this topic is basically useless or not existing! Maybe we can extend it a little further and place it in the official frappe docs?
Anyways, I still have issues with the integration of emails with Office365 and ERPnext/frappe.
Nope, that was not the issue.
I created a new connected app and now its working.
I followed the tutorial step by step. Maybe i missed something in the first run.
Great tutorial. Please move it over to the official docs for Connected Apps in Frappe
@avc I follow all your steps and my incoming email is working completely fine but when I enable outgoing I am getting this error I can’t find where it was gone wrong
First of all: Thanks for the straight forward turorial!
I followed the guide but I’m still receiving an error when I try to enable Outgoing Mails.
On saving the Email Account I receive the following error message:
Here the Traceback:
Traceback (most recent call last):
File "apps/frappe/frappe/email/smtp.py", line 111, in session
Oauth(_session, self.email_account, self.login, self.access_token).connect()
File "apps/frappe/frappe/email/oauth.py", line 48, in connect
self._connect_smtp()
File "apps/frappe/frappe/email/oauth.py", line 75, in _connect_smtp
self._conn.auth(self._mechanism, lambda x: self._auth_string, initial_response_ok=False)
File "/usr/local/lib/python3.10/smtplib.py", line 662, in auth
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (451, b'4.7.0 Temporary server error. Please try again later. PRX5
Do you have any ideas what might be the cause of that error?
thanks for the tutorial. It took some time to get it working, but now i can send E-Mails via MS365 and oauth. But it only works for personal accounts. I would like to additionally add an account like jobs@example.org and allow several users to send via this e-mail. I created a new user for jobs@ and authorized this email for this user. But other users can’t see this email-account. With smtp and basic-auth this was possible.
Can anyone give me a hint how to setup e-mail accounts with oath for shared mailboxes/emails?