Outgoing emails with Microsoft Office 365
Unblu can be configured to send emails in a number of situations. If your organization uses Microsoft Office 365, this requires you to:
-
Set up mail credentials through an app registration in Azure.
-
Configure Unblu to use the app registration you created.
If your organization doesn’t use Microsoft Office 365, follow the SMTP configuration instructions in the article Outgoing emails instead. |
Register an app and set up mail credentials
Before you can configure Unblu to use Microsoft Office 365 for outgoing emails, you must register an app for Unblu in the Azure portal and give it the necessary permissions.
-
In your organization’s Azure portal, navigate to the Azure Service App registrations and create a new app registration. Give it a meaningful name such as unblu-outgoing-email.
-
On the overview page of the app registration you just created, copy the Application (client) ID and Directory (tenant) ID. You need these values when you configure Unblu.
-
Select API permissions in the navigation sidebar, then click Add a permission.
-
In the panel that opens on the right, select Microsoft Graph, then select Application permissions.
-
Enter
mail.send
in the search field and check the Mail.Send option when it appears.For more information on this permission, refer to
Mail.Send
entry in the Microsoft Graph permissions reference. -
Click Add permissions to complete the process.
The Mail.Send permission you added above requires admin consent. Make sure someone within your organization with the the required role reviews your consent request. If they don’t approve the request, Unblu can’t send emails through Microsoft Office 365. |
Once admin consent has been granted for the Mail.Send
permission, the app can send emails from any mailbox in your organization that Azure has access to. How to restrict which mailboxes the app can use is beyond the scope of this article. For more information, refer to the Microsoft article Limiting application permissions to specific Exchange Online mailboxes.
Next, you must create client credentials to give the app you registered to access MS Office 365:
-
In the Essentials section on the overview page of the app registration you just created, click Add a certificate or secret next to Client credentials.
-
If necessary, select Client secrets, then click New client secret.
-
Give the secret a meaningful description and select an expiration time in accordance with your organization’s policies, then click Add.
Make sure to renew the secret before it expires, or Unblu won’t be able to send emails.
-
Copy the Value of your client secret and save it with the IDs you made a note of above.
This is the only opportunity you have to see the value of the client secret you created. If you don’t make a note of it now, you have to create a new one.
You’ve finished setting everything up in the Azure portal. Now you can configure Unblu.
Configure Unblu to use Microsoft Office 365 for outgoing emails
Before you start configuring Unblu, make sure you have the following information to hand:
-
The Application (client) ID
-
The Directory (tenant) ID
-
The Value of the client secret
If you followed the instructions in the previous section, you should have made a note of both IDs and the client secret value.
Next, you must decide which scope you want to add the configuration for Microsoft Office 365 to. Which scope you choose determines which configuration properties you must set.
-
If you have an on-premises Unblu installation, you can add the Microsoft Office 365 configuration in the configuration properties file, the
GLOBAL
scope, or theACCOUNT
scope. -
If you use the Unblu Cloud, you can add the Microsoft Office 365 configuration in the
ACCOUNT
scope or have a member of the Unblu support team set it in theGLOBAL
scope.
If you set configuration property com.unblu.mail.msoffice365.account.enabled to true
on an account, the global settings are ignored. Instead, Unblu uses the account-level settings.
If you have multiple accounts, most of which share the same configuration, you can set the configuration property to true
on the accounts that have a different configuration. That way, the other accounts can share the global configuration thanks to the configuration cascade.
Once you’ve made you decision regarding the scope, set com.unblu.mail.provider to MSOFFICE365
in the appropriate scope. Then proceed with the remaining configuration properties.
GLOBAL
settings
To configure MS Office 365 in the GLOBAL
scope or the configuration properties file, set the following configuration properties:
-
com.unblu.mail.msoffice365.global.clientId: The Application (client) ID from your app registration.
-
com.unblu.mail.msoffice365.global.tenantId: The Directory (tenant) ID from your app registration.
-
com.unblu.mail.msoffice365.global.clientSecret: The Value of the client secret from your app registration.
-
com.unblu.mail.msoffice365.global.mailbox: The email address of the mailbox you want to send emails from.
-
com.unblu.mail.msoffice365.global.proxyUrl: The URL of a proxy needed to access MS Office 365. This may be necessary in on-premises installations. It’s never required if you use the Unblu Cloud.
ACCOUNT
settings
To configure MS Office 365 in the ACCOUNT
scope, set the following configuration properties:
-
com.unblu.mail.msoffice365.account.enabled: set to
true
or the the other configuration properties are ignored. The default value isfalse
. -
com.unblu.mail.msoffice365.account.clientId: The Application (client) ID from your app registration.
-
com.unblu.mail.msoffice365.account.tenantId: The Directory (tenant) ID from your app registration.
-
com.unblu.mail.msoffice365.account.clientSecret: The Value of the client secret from your app registration.
-
com.unblu.mail.msoffice365.account.mailbox: The email address of the mailbox you want to send emails from.
-
com.unblu.mail.msoffice365.account.proxyUrl: The URL of a proxy needed to access MS Office 365. This may be necessary in on-premises installations. It’s never required if you use the Unblu Cloud.
See also
-
If your organization doesn’t use Microsoft Office 365 for email, follow the SMTP configuration instructions in the article Outgoing emails.
-
For information on the types of email Unblu can send and how to configure their content, refer to the Emails section of Outgoing emails.