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

You must also set Friendly URLs to Friendly index.php or Full Friendly Rewrite in the General tab at Configuration () > System Settings > General Settings.

To configure the mail provider:

  1. In the Admin Area, go to the Mail tab at Configuration () > System Settings > General Settings.
    The Mail tab in General Settings
  2. Next to Mail Provider, click Configure Mail Provider.
    Configure Mail Provider in the Mail tab
  3. Select Microsoft for Mail Provider.
    Choosing Microsoft as your Mail Provider
  4. Click the Copy icon next to Redirect URL.
    Configuring Microsoft
  5. Use the Redirect URL value that you copied to create the necessary Microsoft Azure app.
    For instructions, see Create your Microsoft Azure Application below.
  6. Copy the Application (client) ID and Client Secret values from the Microsoft Azure console into the appropriate text boxes in WHMCS.
  7. 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.
  8. Click Save. The system will test your configuration again when you save.
  9. Set System Emails From Name to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.
  10. Click Save Changes.

Create Your Microsoft Azure Application

To use Microsoft as your service provider, you will need to create an app. This will let you connect to Microsoft via WHMCS. If you have already used the Microsoft Azure 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 Azure Portal and log in to your existing account or create a new one.
  2. Go to Azure Active Directory.
    Azure Active Directory
  3. Choose App registrations in the left-side menu and click New registration.
    App Registrations
  4. Enter a name for your application.
    Register an Application
  5. For Supported account types, select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
    Supported Account Types
  6. For Redirect URI, select Web and use the Redirect URL value from WHMCS.
    Redirect URL
  7. Save the application.
  8. Copy and store the Application (client) ID value.
    The Client ID
  9. Click Add a certificate or secret next to Client credentials.
    Add a Client Secret
  10. 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
  11. Copy and store the Client Secret value.
    Client Secrets
    You cannot retrieve the client secret again.

Last modified: June 14, 2024