Our Microsoft Office Exchange server is hosted by Microsoft on their Office 365 Cloud and our SugarCRM instance is setup to send emails from firstname.lastname@example.org.
If we want to allow our Sugar users to send emails from within Sugar without having to setup their own SMTP credentials individually, we must grant the email@example.com user access to send emails as each user.
If this is not setup properly, we receive an error like: 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.
To properly set it up, we must use Microsoft Edge and open the Office365 admin. Here are the steps taken to set up the Office 365 SMTP to send emails as if they were being sent by a SugarCRM user.
Step 1: Search for Exchange admin center
Step 2: Open mailboxes
Step 3: Select and edit the user the email will be sent as. In my case, we had to edit firstname.lastname@example.org.
Step 4: In the popup window, select mailbox delegation and add notifications to both Send As and Send on Behalf.