Page 2 of 2
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 2:16 pm
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 ...
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 3:25 pm
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?
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 3:36 pm
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
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 4:39 pm
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
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 4:59 pm
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"
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 6:06 pm
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
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Mon Nov 07, 2022 7:57 pm
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
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Nov 08, 2022 3:51 pm
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,
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Nov 08, 2022 5:18 pm
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?
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Jan 16, 2024 5:01 pm
by isikerkan
Hi Klemen
There was no update on this ticket for a long time, but we ran into the same issues.
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?

Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Jan 16, 2024 5:20 pm
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?
Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Jan 16, 2024 7:17 pm
by isikerkan
Thanks for the quick Response !
Option 1
No there is only one Inbox Folder there and only one Mail-Adress for our Members
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

Re: Hesk 3.4.1 imap fetching stopped working
Posted: Tue Jan 16, 2024 7:19 pm
by Klemen
It's not a bug, it's a feature © Microsoft
Glad to heat Option 2 fixed it.