Intranet Connections needs to send emails from the email address of the user who kicked off an action, so recipients can reply directly to the sender. This includes situations such as:
- Notifications from instructors or supervisors with the Training Calendar
- Student registration send from student's email to instructor in Training Calendar
- Notification stages in a workflow if "send from submitting user" is selected
- Birthday or Work Anniversary messages
- Updates to a support desk ticket by support agent if notifications are enabled
Office 365 however, by default, prohibits an account from sending as another user unless all users have set the sending account as a trustee as "send as". The Microsoft article How to set up a multifunction device or application to send email using Office 365 outlines your options for resolution.
Because Option 1 and Option 2 connect the intranet directly with Exchange, a user name and password is required. This causes issues when the intranet needs to send as any other account's email address because the from address will not match the account used to connect and the mail will not be sent. This can be overcome by assigning the account used to connect as a send as trustee to all accounts the intranet may send as, but this is difficult to maintain with hundreds of email address (search for *Add-RecipientPermission -Identity $_.UserPrincipalName -AccessRights SendAs -Trustee "SMTP relay address"* for more details). In addition, Option 2 can only send to emails within the domain.
We recommend using Option 3 instead: Configure a connector to send mail using Office 365 SMTP relay.
In this scenario, the intranet points to an SMTP relay server which can either be an internal SMTP relay or an SMTP server provided by your ISP. Please refer to the article linked above for details on how to configure this. Please note the following:
- Your network must allow traffic on port 25 from the intranet server to the relay and then on to the office mail server.
- The relay server must connect to an MX endpoint which looks like "contoso-com.mail.protection.outlook.com" not "smtp.office365.com"
- In Office 365 Exchange admin screens, you must create a connector for the SMTP relay server
- In your DNS registrar, you may have to add an SPF record so messages aren't marked as spam