[Resolved] IMAP Mail Fetch not working
Posted: Mon Jun 09, 2025 7:58 pm
LXC container running docker instance of hesk
Guide followed for IMAP: https://www.hesk.com/knowledgebase/?article=91
HESK version
3.5.3
PHP version
8.2.25 (MySQLi)
MySQL version
8.0.42
https://myurl/inc/mail/hesk_imap.php?key=MYKEY
Apart from that no errors or output when running it manually inside or outside the container:
I want to add, on step 19, it asks me to login with my m365 account, which I did, but the permission granted screen never appears as per the image.
Resolution
I tried step 19 using Edge (and not firefox or variants of firefox such as Floorp) and it signed me in, and then mail was translated into tickets.
Guide followed for IMAP: https://www.hesk.com/knowledgebase/?article=91
HESK version
3.5.3
PHP version
8.2.25 (MySQLi)
MySQL version
8.0.42
- IMAP configured with OAUTH using Microsoft Entra ID.
IMAP Tests successful
Unread mail in the mailbox for the testing
Cronjob configured & manually tested
Debug mode enabled
Code: Select all
openid offline_access https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/POP.AccessAsUser.All https://outlook.office365.com/SMTP.Send
Code: Select all
#!/usr/bin/php -q
Connected to the IMAP server "outlook.office365.com:993".
Warning: Undefined array key 1 in /srv/inc/mail/imap/OAuthIMAP.php on line 394
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /srv/inc/mail/imap/OAuthIMAP.php on line 395
Warning: Undefined array key 1 in /srv/inc/mail/imap/OAuthIMAP.php on line 396
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /srv/inc/mail/imap/OAuthIMAP.php on line 396
No unread messages found.
Disconnected from the IMAP server.
Code: Select all
docker exec -it docker-hesk-app-1 bash -c 'set -x; php /srv/inc/mail/hesk_imap.php'
Code: Select all
docker exec docker-hesk-app-1 php /srv/inc/mail/hesk_imap.php
Resolution
I tried step 19 using Edge (and not firefox or variants of firefox such as Floorp) and it signed me in, and then mail was translated into tickets.