Within Intranet Connections, many notifications will use the System Email address; however, there are some exceptions to this where the 'from' email address will be directly from a user rather than the system email. Our software has these particular notifications hardcoded to use the user's email address if they've performed an action that results in an email notification.
Examples of actions that would use the user's email:
- 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
- Email notifications resulting from these types of actions will show up as an undeliverable task within Lucee unless "send as" permissions have been granted.
- The mail spool is in /WEB-INF/lucee/remote-client/ on the web server.
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