Configure with Office 365 email ID - Mail Not sending for other users

Hi

We configured office 365 email id as default sending and assigned to administrator’s user id. we able to send emails in administrator login but for other users logged in we unable to send emails, error shows as below. Please help friends.

(554, b’5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:291B0000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:6F390000, 1.36674:0E000000, 1.61250:00000000, 1.45378:74390000, 1.44866:94010000, 16.55847:C0190000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F3B8C0000103100000000, 20.50032:140F3B8C7017000000000000, 0.35180:140F3B8C, 255.23226:0A000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:1F000130, 0.35250:0A000000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:54000000, 1.36674:32000000, 1.61250:00000000, 1.45378:59000000, 1.44866:01000000, 16.55847:C0000000, 17.43559:00000000A0030000000000000000000000000000, 20.52176:140F3B8C0000101053000000, 20.50032:140F3B8C7017000049000000, 0.35180:58000000, 255.23226:4800D13D, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:5F000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:64000000, 0.38698:0F010480, 0.37692:0F010480, 0.44092:0F010480, 0.41232:00000000, 0.60208:302E3331, 0.37136:30303A54, 0.34608:30334D42, 0.55056:3A633737, 0.42768:362D6662, 0.56112:6534622D, 0.52807:2D613433, 7.36354:010000000000010900000000, 4.33016:DC040000, 7.40748:010000000000010BA64E70C7, 7.57132:0000000000000000362D6662, 1.63016:32000000, 4.39640:DC040000, 8.45434:429A2B89A0CF3B41ACA44BD46A5C9DDEF7CBFADF, 5.10786:0000000031352E32302E333133312E3030303A545941505230334D42333037303A63373730346561362D666265322D346534622D626364622D6134333833323534313731610020100F010480, 7.51330:159968E0E014D8080F010480, 0.39570:00000000, 1.55954:0A000000, 0.49266:02000000, 1.33010:0A000000, 2.54258:00000000, 0.40002:7A000000, 1.56562:00000000, 1.64146:32000000, 1.33010:32000000, 2.54258:DC040000, 255.1750:B9000000, 255.31418:0A005636, 0.22753:AF000000, 255.21817:DC040000, 0.64418:0A006136, 4.39842:DC040000, 0.41586:C3000000, 4.60547:DC040000, 0.21966:B9000000, 4.30158:DC040000 [Hostname=TYAPR03MB3070.apcprd03.prod.outlook.com]‘)
Traceback (most recent call last):
File “/home/erpnext/frappe-live/apps/frappe/frappe/email/queue.py”, line 415, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, message)
File “/usr/lib/python3.6/smtplib.py”, line 888, in sendmail
raise SMTPDataError(code, resp)
smtplib.SMTPDataError: (554, b’5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:291B0000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:6F390000, 1.36674:0E000000, 1.61250:00000000, 1.45378:74390000, 1.44866:94010000, 16.55847:C0190000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F3B8C0000103100000000, 20.50032:140F3B8C7017000000000000, 0.35180:140F3B8C, 255.23226:0A000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:1F000130, 0.35250:0A000000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:54000000, 1.36674:32000000, 1.61250:00000000, 1.45378:59000000, 1.44866:01000000, 16.55847:C0000000, 17.43559:00000000A0030000000000000000000000000000, 20.52176:140F3B8C0000101053000000, 20.50032:140F3B8C7017000049000000, 0.35180:58000000, 255.23226:4800D13D, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:5F000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:64000000, 0.38698:0F010480, 0.37692:0F010480, 0.44092:0F010480, 0.41232:00000000, 0.60208:302E3331, 0.37136:30303A54, 0.34608:30334D42, 0.55056:3A633737, 0.42768:362D6662, 0.56112:6534622D, 0.52807:2D613433, 7.36354:010000000000010900000000, 4.33016:DC040000, 7.40748:010000000000010BA64E70C7, 7.57132:0000000000000000362D6662, 1.63016:32000000, 4.39640:DC040000, 8.45434:429A2B89A0CF3B41ACA44BD46A5C9DDEF7CBFADF, 5.10786:0000000031352E32302E333133312E3030303A545941505230334D42333037303A63373730346561362D666265322D346534622D626364622D6134333833323534313731610020100F010480, 7.51330:159968E0E014D8080F010480, 0.39570:00000000, 1.55954:0A000000, 0.49266:02000000, 1.33010:0A000000, 2.54258:00000000, 0.40002:7A000000, 1.56562:00000000, 1.64146:32000000, 1.33010:32000000, 2.54258:DC040000, 255.1750:B9000000, 255.31418:0A005636, 0.22753:AF000000, 255.21817:DC040000, 0.64418:0A006136, 4.39842:DC040000, 0.41586:C3000000, 4.60547:DC040000, 0.21966:B9000000, 4.30158:DC040000 [Hostname=TYAPR03MB3070.apcprd03.prod.outlook.com]’)

You can check this link on stack overflow for a simple explaination of your issue.