Hesk 3.4.1 imap fetching stopped working

Helpdesk for my helpdesk software

Moderator: mkoch227

fia_fa
Posts: 5
Joined: Mon Nov 07, 2022 2:12 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by fia_fa »

Hello,

We have the same problem with Imap fetching stop working with Office 365.

Version : 3.4.1
SMTP : OAuth

Need help please, staff app is down ...
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

What kind of messages do you get if you test your IMAP connection in Admin > Settings > Email?

What if you turn Debug mode ON and repeat the same?
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
fia_fa
Posts: 5
Joined: Mon Nov 07, 2022 2:12 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by fia_fa »

Succes fort IMAP and IMAP, seems all good with OAuth connexion.

We don't find to turn UP debug mode since with admin user, "feature" zone not appear.

Thakns for your repply
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

Do you have the cron job enabled to automatically call your IMAP fetching script?

Try again steps 5-7 in the instructions:
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
fia_fa
Posts: 5
Joined: Mon Nov 07, 2022 2:12 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by fia_fa »

When i call ".../inc/mail/hesk_imap.php", the returned message is : " #!/usr/bin/php -q" it's normal ?

About cron task, it's configure seems 2 years with this command, that was working :
wget -O /dev/null "http://yoursite.com/hesk/inc/mail/hesk_ ... XXXXXXXXXX"
fia_fa
Posts: 5
Joined: Mon Nov 07, 2022 2:12 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by fia_fa »

So, We found debug mod !

This is message we have :

Connected to the IMAP server "outlook.office365.com:993".
No unread messages found.
Disconnected from the IMAP server.

We check the mailbox too and have a few unread messages ...

Thnks
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

This is usually caused by registering OAuth Provider when logged in with a different username than the one you use.

Try this:
1. open Hesk in a *private* browser window (incognito mode if you use Chrome)
2. login to the admin panel
3. go to Admin panel > Tools > OAuth providers
4. click the "Edit" icon next to your O365 provider
5. click save
6. make 100% sure you log in into O365 with the email address you use in Hesk, not any other account
7. test again
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
fia_fa
Posts: 5
Joined: Mon Nov 07, 2022 2:12 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by fia_fa »

Finally force activated IMAP on exchange to restore services for the moment ...

Try different Oauth provider with the same account 365, different browser, and have the same issue, No unread messages found.

We will try maybe later to debug this case, thanks for your help.

best regard,
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

Try this:

1. send a test email to your help desk email address
2. login to the email at https://outlook.office365.com/mail/
3. what is the exact name of the folder where your test email is located?
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
isikerkan
Posts: 2
Joined: Tue Jan 16, 2024 4:40 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by isikerkan »

Hi Klemen

There was no update on this ticket for a long time, but we ran into the same issues. :D

We managed to configure and run Hesk over POP3 to our Exchange Online 365. Everything works fine, but we would prefer to use IMAP to keep local copies in the Inbox. The Folder name itself on Microsoft is called "Inbox" where incoming mails can be found.

When we try to test IMAP the Connection is succesful, but the script doesnt find an unread E-Mail (even tough there is one and can be found with pop3).

Hesk probably looks in the wrong folder for the Incomign Mail?
Image
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

Option #1

Are there multiple folders called "inbox"? If yes, rename them so that there is only one, the one Hesk will check.

Option #2

There problem could also be something else - this happens a lot with O365 and they don't throw any errors:

This usually happens when you are setting up OAuth for one email account, but are logged into another one. Try this:

1. open Hesk in a private (incognito) browser window to make sure you are not logged in anywhere
2. go to Hesk Tools > OAuth Providers
3. click the "Edit" icon for the "Office 365" provider
4. click "Save" and you will be redirected to Microsoft
5. Make 100% sure you login with the email address you use in fetching
6. when you get back to Hesk, go to Settings > Email and test the IMAP connection again

Do you get any other number of messages now instead of 0?
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
isikerkan
Posts: 2
Joined: Tue Jan 16, 2024 4:40 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by isikerkan »

Thanks for the quick Response ! :D

Option 1
No there is only one Inbox Folder there and only one Mail-Adress for our Members
Image

Option 2
That one should be covered and good. I had the setup made in private Browser before with my Admin User and just redid it as you mentioned it.
Something magical happened and somehow IMAP works now. Im baffled but its Exchange Online so bugs are to be expected 🤷‍♂️
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk 3.4.1 imap fetching stopped working

Post by Klemen »

It's not a bug, it's a feature © Microsoft :lol:

Glad to heat Option 2 fixed it.
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