Page 1 of 1

Issue with retrieving emails

Posted: Sat Feb 10, 2024 3:55 pm
by Lodestone
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.

Re: Issue with retrieving emails

Posted: Sat Feb 10, 2024 4:04 pm
by Klemen
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?

Re: Issue with retrieving emails

Posted: Sat Feb 10, 2024 4:15 pm
by Lodestone
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.

Re: Issue with retrieving emails

Posted: Sat Feb 10, 2024 4:32 pm
by Klemen
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)?

Re: Issue with retrieving emails

Posted: Sat Feb 10, 2024 4:38 pm
by Lodestone
You Sir are amazing. That has worked. Thank you so much for you help!!!!

Re: Issue with retrieving emails

Posted: Mon Feb 12, 2024 5:45 pm
by Lodestone
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

Posted: Mon Feb 12, 2024 6:05 pm
by Klemen
Did you follow all of the set up steps? Perhaps missing step 5 and onwards?
https://www.hesk.com/knowledgebase/?article=91