Issue with retrieving emails

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Lodestone
Posts: 4
Joined: Sat Feb 10, 2024 3:48 pm

Issue with retrieving emails

Post 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.
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Re: Issue with retrieving emails

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
Lodestone
Posts: 4
Joined: Sat Feb 10, 2024 3:48 pm

Re: Issue with retrieving emails

Post 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.
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Re: Issue with retrieving emails

Post 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)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
Lodestone
Posts: 4
Joined: Sat Feb 10, 2024 3:48 pm

Re: Issue with retrieving emails

Post by Lodestone »

You Sir are amazing. That has worked. Thank you so much for you help!!!!
Lodestone
Posts: 4
Joined: Sat Feb 10, 2024 3:48 pm

Re: Issue with retrieving emails

Post 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.
Klemen
Site Admin
Posts: 10141
Joined: Fri Feb 11, 2005 4:04 pm

Re: Issue with retrieving emails

Post by Klemen »

Did you follow all of the set up steps? Perhaps missing step 5 and onwards?
https://www.hesk.com/knowledgebase/?article=91
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image 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
Post Reply