Set Up Email Importing - Microsoft

WHMCS can import email through several different service providers, including POP3 or IMAP, Google®, and Microsoft®. Google and Microsoft include the benefits of OAuth2, which provides more security than traditional username-and-password authentication.

  • Email piping and email importing use separate configurations and are distinct methods of importing email replies.
  • We added support for email importing with Microsoft Azure® apps in WHMCS 8.6.

Set Up Email Importing with Microsoft

To set up email importing using Microsoft, you will need to configure a Microsoft Azure® app and then set up Microsoft in WHMCS.

1. Create a Microsoft Azure app.

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.

2. Set up Microsoft in WHMCS.

To set up importing with Microsoft:

  1. Set Friendly URLs to Full Friendly Rewrite or Friendly index.php in the General tab at Configuration () > System Settings > General Settings.
  2. Go to Configuration () > System Settings > Support Departments.
  3. Enter your support department information in the Add New Department section of the page or click Edit for an existing department.
  4. Under Mail Importing Configuration, select Microsoft for Service Provider.
    Configuring Google for importing
  5. Copy-and-paste the Client ID and Client Secret from the Microsoft Azure console into the appropriate boxes.
  6. In WHMCS, next to Connection Token, click Connect. (There should not be a value in Connection Token yet.)
    Click Connect
    If you have multiple Microsoft accounts, the system may prompt you to choose the correct account. Log in to the email account from which WHMCS will send emails to clients.
  7. Follow the prompts to approve access for your account. When you finish this, WHMCS will automatically enter a token in Connection Token.
  8. Click Save. The system will test your configuration again when you save, and then you will be ready to start using email importing.
  9. Set your System Emails From Email address to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.

Last modified: June 24, 2024