Connection appears to be working, but we cannot get a valid count of emails.
When setting up an email connection from Hesk to your Microsoft 365 (Office 365) email account, you may see this error message when testing the connection:
Connection appears to be working, but we cannot get a valid count of emails.
This problem usually occurs when you grant OAuth permissions for one account (for example, helpdesk@example.com) while you are logged in to another Microsoft account (for example, administrator@example.com).
Please try following these steps precisely:
- Open Hesk in a private (incognito) browser window to make sure you are not logged in anywhere
- Go to Hesk Tools > OAuth Providers
- Click the "Edit" icon for your OAuth provider and double-check the details (remember that the Client Secret has an expiration date)
- Click "Save" and you will be redirected to Microsoft
- Make 100% sure you log in to Microsoft with the email account you want to connect to Hesk (helpdesk@example.com)
- When you get back to Hesk, go to Settings> Email
- Make sure SMTP port is set to 587 and Encryption to TLS; setting encryption to "None" might show a successful connection, but it will not actually work when sending emails when using Microsoft 365
- Make sure IMAP port is set to 993 and Encryption to SSL. If you are using POP3, the POP3 port should be 995 and TLS Protocol ON,
- Test the SMTP and IMAP/POP3 connections
- If everything works normally now, save changes
