The ability to email directly out of SugarCRM using Sugar's compose screen is a favorite feature of many of our customers. It's convenient to send emails from and archive emails directly to Sugar, and it usually works great. However, in the past year, I've noticed an internal server error will sometimes occur when setting up a new user. After some investigation, I found some Office 365 Admin setting changes that fixed it. In this post, I'll detail what Admins should be looking for and the steps they must take to fix this internal server error when emailing from SugarCRM.
If you run into issues sending emails out of SugarCRM, there are a few things to try on the Office 365 side. The error we were receiving in this case was "Error: There was an internal server error. Please try again."
"Fri Oct 16 14:09:49 2020 [7453][dd7fdc2d-7740-4cae-9d7f-a525744f4b4f][FATAL] SMTP -> ERROR: DATA END command failed. Reply: STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:E33B0000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:C3220000, 1.36674:0E000000, 1.61250:00000000, 1.45378:C8220000, 1.44866:EE000000, 16.55847:9B110000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F958D1500F01F00000000, 20.50032:140F958D8517F01F00000000, 0.35180:140F958D, 255.23226:013C Code: 554 Extended Code: 5.2.0
Fri Oct 16 14:09:49 2020 [7453][dd7fdc2d-7740-4cae-9d7f-a525744f4b4f][FATAL] PHPMailerProxy encountered an error: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:E33B0000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:C3220000, 1.36674:0E000000, 1.61250:00000000, 1.45378:C8220000, 1.44866:EE000000, 16.55847:9B110000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F958D1500F01F00000000, 20.50032:140F958D8517F01F00000000, 0.35180:140F958D, 255.23226:013C SMTP code: 554 Additional SMTP info: 5.2.0
Fri Oct 16 14:09:49 2020 [7453][dd7fdc2d-7740-4cae-9d7f-a525744f4b4f][FATAL] PHPMailerProxy encountered an error: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:E33B0000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:C3220000, 1.36674:0E000000, 1.61250:00000000, 1.45378:C8220000, 1.44866:EE000000, 16.55847:9B110000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F958D1500F01F00000000, 20.50032:140F958D8517F01F00000000, 0.35180:140F958D, 255.23226:013C SMTP code: 554 Additional SMTP info: 5.2.0
Fri Oct 16 14:09:49 2020 [7453][dd7fdc2d-7740-4cae-9d7f-a525744f4b4f][FATAL] SMTP -> ERROR: QUIT command failed. Reply: , 255.27962:0A000000, 255.27962:0E000000, 255.31418:063C0000, 0.35250:0A006632, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:18000000, 1.36674:32000000, 1.61250:00000000, 1.45378:1D000000, 1.44866:01000000, 16.55847:84000000, 17.43559:00000000A0030000000000003600000000000000, 20.52176:140F958D1500101053000000, 20.50032:140F958D8517000008000000, 0.35180:58000000, 255.23226:4800D13D, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:B5000000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:CB000000, 0.38698:05000780, 0.37692:01000000, 0.44092:2F000100, 0.41232:01000000, 0.60208:0F010480, 0.37136:0C58930D, 0.34608:00000100, 0.55056:466009C8, 0.42768:B682F7C9, 0.56112:33303238, 0.52807:48290100, 7.36354:010000000000010900363732, 4.33016:DC040000, 7.40748:010000000000010B466009C8, 7.57132:00000000000000008013C2BB, 1.63016:32000000, 4.39640:DC040000, 8.45434:3885ED702F0B8B46AC756C3E06C749C431304D42, 5.10786:0000000031352E32302E333437372E3032313A444D36505231304D42333337303A63383039363034362D646664632D346539342D623638322D66376339353561623437323600101002000000, 7.51330:F2633D24DD71D8080F010480, 0.39570:B9040000, 1.55954:0A000000, 0.49266:56000000, 1.33010:0A000000, 2.54258:00000000, 0.40002:02000000, 1.56562:00000000, 1.64146:32000000, 1.33010:32000000, 2.54258:DC040000, 255.1750:B9000000, 255.31418:0A005636, 0.22753:49010000, 255.21817:DC040000, 0.64418:0A006136, 4.39842:DC040000, 0.41586:C3000000, 4.60547:DC040000, 0.21966:59010000, 4.30158:DC040000 [Hostname=DM6PR10MB3370.namprd10.prod.outlook.com]
221 2.0.0 Service closing transmission channel
Code: 000"