Setting Up Microsoft As Your Mail Service Provider
WHMCS can send emails without any additional configuration usingPHP mail(). While this works in most cases, other mail providers may give you a better experience and access to additional features.
In addition to the existing SMTP support, WHMCS 8.0 added support for Mailgun, SendGrid, SparkPost, and Google OAuth with SMTP. WHMCS 8.6 and later also include Microsoft services as separate mail provider options. For more information, see:
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. You must also set Friendly URLs in the General tab at Configuration > System Settings > General Settings to Full Friendly Rewrite or Friendly index.php.
To configure Microsoft on your WHMCS installation:
1. Go to the Mail tab at Configuration > System Settings > General Settings.
2. Next to Mail Provider, click Configure Mail Provider.
3. Select Microsoft for Mail Provider.
4. Click the Copy icon next to Redirect URL.
5. Use this URL to create the necessary Microsoft Azure app. For instructions, see Create your Microsoft Azure Application below.
6. After you create your Microsoft Azure app, copy-and-paste the Application (client) ID and Client Secret from the Microsoft Azure console into the appropriate text boxes.
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.
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.
Make certain to set your From Email address to the Microsoft mail account that you are using. Microsoft services may not accept email from a different identity.
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.
3. Choose App registrations in the left-side menu and click New registration.
4. Enter a name for your 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).
6. For Redirect URI, select Web and use the Redirect URL value from WHMCS.
7. Save the application.
8. Copy and store the Application (client) ID value.
9. Click Add a certificate or secret next to Client credentials.
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.
11. Copy and store the Client Secret Value.
You cannot retrieve the client secret again.
Use these values to complete configuration in WHMCS.