Guides & TutorialsSystem SettingsMailSetting Up Microsoft 365® (formerly Office 365) as your Mail Service Provider

Setting Up Microsoft 365® (formerly Office 365) as your Mail Service Provider

WHMCS can send emails without any additional configuration using PHP 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:

The steps below set up SMTP using Microsoft 365. For steps to set up Microsoft services as a separate service provider, see Setting Up Microsoft As Your Mail Service Provider.

Set up Microsoft 365 in WHMCS

To use Microsoft 365 as your SMTP Service Provider:

1. Go to the Mail tab at Configuration > System Settings > General Settings

2. Click Configure Mail Provider.

3. Select SMTP for Mail Provider.

4. Choose a Mail Encoding.

5. Select Generic for Service Provider.

6. Enter smtp.office365.com for the SMTP Host.

7. Enter 587 for SMTP Port

8. Select Password for SMTP Authentication.

9. Enter your SMTP Username. This is the Microsoft 365 email address that you will be using.

10. Enter your SMTP Password, which will be the password of the above Microsoft 365 email account.

To retrieve your SMTP details, visit your Microsoft 365 Admin Center or ask your system mail administrator.

11 . Select TLS for SMTP SSL Type.

12. Click Test Configuration at the bottom to make sure that you entered everything correctly.

13. When you see a success message, click Save Changes.

WHMCS will now use SMTP to send mail.

For help troubleshooting SMTP settings, see Troubleshooting Email Sending Problems.