Hi, I have managed to get IMAP settings successfully working in HESK. I am checking the email account and I can see the emails are being read from the mailbox, HOWEVER with debug mode on and using the "https://www.****.co.uk/helpdesk/inc/mail/hesk_imap.php" link this is what it is coming up with and I am unsure on how to fix.
Any help would be gratefully received. I have obviously *** my domain name...
Result of going to "https://www.****.co.uk/helpdesk/inc/mail/hesk_imap.php" in my browser:
#!/usr/bin/php -q
Connected to the IMAP server "outlook.office365.com:993".
Warning: Undefined array key 1 in /var/www/vhosts/****.co.uk/httpdocs/helpdesk/inc/mail/imap/OAuthIMAP.php on line 394
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/****.co.uk/httpdocs/helpdesk/inc/mail/imap/OAuthIMAP.php on line 395
Warning: Undefined array key 1 in /var/www/vhosts/****.co.uk/httpdocs/helpdesk/inc/mail/imap/OAuthIMAP.php on line 396
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/****.co.uk/httpdocs/helpdesk/inc/mail/imap/OAuthIMAP.php on line 396
No unread messages found.
Disconnected from the IMAP server.
Issue with retrieving emails
Moderator: mkoch227
Re: Issue with retrieving emails
What version of PHP are you using?
When you test IMAP connection from the Admin panel > Settings > Email, does it show the correct number of unread emails in your mailbox?
Do you have more than one maiblox named "Inbox" in your email account?
When you test IMAP connection from the Admin panel > Settings > Email, does it show the correct number of unread emails in your mailbox?
Do you have more than one maiblox named "Inbox" in your email account?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Issue with retrieving emails
What version of PHP are you using?
8.2.15 (MySQLi)
I have tried older versions but still same issue.
When you test IMAP connection from the Admin panel > Settings > Email, does it show the correct number of unread emails in your mailbox?
No it constantly shows 0 but the emails in the support mailbox go from unread to read on their own.
Do you have more than one maiblox named "Inbox" in your email account?
No, Just the one account.
8.2.15 (MySQLi)
I have tried older versions but still same issue.
When you test IMAP connection from the Admin panel > Settings > Email, does it show the correct number of unread emails in your mailbox?
No it constantly shows 0 but the emails in the support mailbox go from unread to read on their own.
Do you have more than one maiblox named "Inbox" in your email account?
No, Just the one account.
Re: Issue with retrieving emails
This usually happens when OAuth configuration in Hesk is done when logged into another Microsoft365 account.
Try this:
1. open Hesk in a PRIVATE/INCOGNITO browser window
2. go to Tools > Oauth Providers
3. click the "Edit" icon next to your provider
4. click "Save"
5. you will be prompted to login into Microsoft 365; make 100% sure you login with the email account you will use in Hesk
6. when back at Hesk, go to Settings > Email
7. test the IMAP email connection - does it still show 0 unread emails (make sure you have at least 1 unread email inside when testing)?
Try this:
1. open Hesk in a PRIVATE/INCOGNITO browser window
2. go to Tools > Oauth Providers
3. click the "Edit" icon next to your provider
4. click "Save"
5. you will be prompted to login into Microsoft 365; make 100% sure you login with the email account you will use in Hesk
6. when back at Hesk, go to Settings > Email
7. test the IMAP email connection - does it still show 0 unread emails (make sure you have at least 1 unread email inside when testing)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Issue with retrieving emails
You Sir are amazing. That has worked. Thank you so much for you help!!!!
Re: Issue with retrieving emails
So I am sending emails to the "support" mailbox and Hesk is saying that is can see the 2 emails however they are not being converted to tickets. Any ideas? I am not getting any errors either which is a tad confusing.
Re: Issue with retrieving emails
Did you follow all of the set up steps? Perhaps missing step 5 and onwards?
https://www.hesk.com/knowledgebase/?article=91
https://www.hesk.com/knowledgebase/?article=91
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools