Microsoft Exchange SMTP

Prev Next

About this document

This document provides a comprehensive, step-by-step guide to configuring Microsoft Exchange SMTP in SAFE, enabling email notifications to be sent from your organization’s own email infrastructure.

Overview

SAFE supports sending outbound emails through:

  • Microsoft Exchange / Microsoft 365 SMTP (OAuth-based)

  • Custom SMTP servers

Once configured, SAFE routes all email notifications, based on your chosen scope, through the configured mail server instead of the default SAFE mail service.

Prerequisites

  • SAFE Admin Access is required to configure SMTP settings.

  • Microsoft 365 Administrator Account (Global Admin or Application Administrator)

  • Access to the Azure Portal

  • Your Microsoft 365 email address

Generate Connection Details

  1. Log in to the  Azure portal.

  2. Navigate to Microsoft Entra ID (Azure Active Directory).

  3. Register a New application.

  4. Enter the details:

    1. Name

    2. Supported account types: Select the “Accounts in this organizational directory only.”

    3. Redirect URI: Enter the Platform as Web and URI: http://localhost (for desktop application)

  5. Click Register.

  6. Once the registration is completed, the details will be displayed on the Overview page. Copy the connection details from the Overview page.

    1. Client ID (Application ID)

    2. Tenant ID (Directory ID)

  7. Click Certificates & secrets from the left navigation.

  8. Click the + New client secret button.

  9. Enter the details:

    1. Description

    2. Expiry

    3. Start and End Date

  10. Click the Add button.

  11. Copy and save the Client Secret displayed in the Value column. The system displays this value only once.

  12. Click API permissions from the left navigation.

  13. Click the + Add a permission button.

  14. Select Microsoft Graph.

  15. Choose “Application permissions” as the permission type option.

  16. Search and select “Mail.Send” as permission.

  17. Click the Add permissions button.

  18. After adding permissions, you'll see a yellow warning about admin consent.

  19. Click “Grant admin consent for Your Organization”.

  20. Click Yes to confirm. The status will be changed to "Granted for [Your Organization]".

Configure Microsoft Exchange SMTP in SAFE

Once you have completed the Microsoft Azure setup and collected the Tenant ID, Client ID, and Client Secret, follow the steps below to configure Microsoft SMTP inside SAFE.

  1. Navigate to Integrations.

  2. Click the + icon and search for SMTP.

  3. Click on the Microsoft SMTP card.

  4. Alternatively, you can also navigate to Settings > Advanced > Email Accounts, and click the + icon.

  5. Enter the connection details such as Name (any unique name), Tenant ID, Client ID, and Client Secret, generated in the steps above.

  6. Enter the Email Identifier (Provide the email address that SAFE will use as the sender for all notifications).

  7. Enter the Test Email Recipient (Enter an email address that will receive the test email).

  8. Click Send Test Email to validate the SMTP configuration.

  9. Click the Save button.

  10. All SAFE notifications will now be sent through the configured SMTP.

    Note

    SAFE allows configuring multiple Microsoft or Custom SMTP profiles, but only one can be active at a time. To use another SMTP configuration, you must first disable the existing one from Settings > Advanced > Email Accounts.