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.
- Email importing is part of our support ticket system and does not impact how your WHMCS system sends mail to admins and clients. For steps to configure system mail with Microsoft, see Use Microsoft for System Mail and Use Microsoft 365 for System Mail.
Set Up Email Importing with Microsoft
To set up email importing using Microsoft, you will need to configure a Microsoft Entra® ID (formerly Microsoft Azure®) app and then configure WHMCS to use it.
1. 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:
- Go to the Microsoft Entra Portal and log in to your existing account or create a new one.
- In the left side menu under Applications, choose App registrations and click New registration.
- Enter a name for your application.
- For Supported account types, select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).
- For Redirect URI, select Web and use the Redirect URL value from WHMCS.
- Click Register to save the application.
- Copy and store the Application (client) ID value.
- In the Certificates & Secrets menu, click New client secret.
- 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.
- Copy and store the Client Secret value.You cannot retrieve the client secret again.
2. Set up Microsoft in WHMCS.
To set up importing with Microsoft:
- 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 Import Query Errors.
- Go to Configuration () > System Settings > Support Departments.
- Enter your support department information in the Add New Department section of the page or click Edit for an existing department.
- Under Mail Importing Configuration, select Microsoft for Service Provider.
- Copy-and-paste the Client ID and Client Secret from the Microsoft Entra console into the appropriate boxes.
- In WHMCS, next to Connection Token, click Connect. (There should not be a value in Connection Token yet.)
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. - Follow the prompts to approve access for your account. When you finish this, WHMCS will automatically enter a token in Connection Token.
- Click Save. The system will test your configuration again when you save, and then you will be ready to start using email importing.
- 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: November 19, 2024