Use Microsoft for System Mail

This mail provider is only available in WHMCS 8.6 and later.

You can choose from several supported mail providers to handle mail for your WHMCS installation. To configure Microsoft, you will need to create an app in the Microsoft Azure® console and configure the mail provider in the Mail tab at Configuration () > System Settings > General Settings.

  • This mail provider includes support for all Microsoft Azure® apps, like Hotmail®, Microsoft Outlook®, Microsoft 365®, Skype®, and several others.
  • This includes OAuth2 to authorize app or service access and is more secure than traditional username-and-password authentication.
Your mail provider configuration is separate from any email piping or importing that you configure for your support departments. For more information, see Email Piping and Email Importing.

Set Up Microsoft as your Mail Provider

To configure the mail provider:

  1. Set Friendly URLs to Full Friendly Rewrite or Friendly index.php in the General tab at Configuration () > System Settings > General Settings.
    Do not set Friendly URLs to Basic URLs. You will experience errors. For more information, see Microsoft Mail Query Errors.
  2. Go to the Mail tab at Configuration () > System Settings > General Settings.
    The Mail tab in General Settings
  3. Next to Mail Provider, click Configure Mail Provider.
    Configure Mail Provider in the Mail tab
  4. Select Microsoft for Mail Provider.
    Choosing Microsoft as your Mail Provider
  5. Click the Copy icon next to Redirect URL.
    Configuring Microsoft
  6. Use the Redirect URL value that you copied to create the necessary Microsoft Entra app.
    For instructions, see Create a Microsoft Entra App below.
  7. Copy the Application (client) ID and Client Secret values from the Microsoft Entra console into the appropriate text boxes in WHMCS.
  8. Click Connect.
    • Connection Token will be blank until you do this.
    • If you have multiple Microsoft accounts, the system may prompt you to choose the correct account. If you see this prompt, log in to the email account from which WHMCS will send emails to clients.
      Choosing a Microsoft Account
      After you complete the necessary prompts, a success message will display and WHMCS will automatically enter a token in Connection Token.
  9. Click Save. The system will test your configuration again when you save.
  10. Set System Emails From Name to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.
  11. Click Save Changes.

Create a Microsoft Entra App

If you have already used the Microsoft Entra console, you may not need to perform some of these steps, or interfaces may not look like the screenshots below.

To do this:

  1. Go to the Microsoft Entra Portal and log in to your existing account or create a new one.
  2. In the left side menu under Applications, choose App registrations and click New registration.
    App Registrations
  3. Enter a name for your application.
    Register an Application
  4. For Supported account types, select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
    Supported Account Types
  5. For Redirect URI, select Web and use the Redirect URL value from WHMCS.
    Redirect URL
  6. Click Register to save the application.
    Redirect URL
  7. Copy and store the Application (client) ID value.
    The Client ID
  8. In the Certificates & Secrets menu, click New client secret.
  9. Enter a description and choose a validity length.
    When the validity period expires, you must create a new client secret and repeat the steps to configure Microsoft in WHMCS.

    Add a Client Secret
  10. Copy and store the Client Secret value.
    You cannot retrieve the client secret again.

Last modified: October 30, 2024