Hi,
i am using 17.0.1 and have managed to use IMAP collect with Microsoft 365 oauth2, but i have trouble with the emailcollector, my cron job has 3 jobs which are being processed every 5 minutes, but it collects only from the last cron job, for example, the following picture is the way it works with normal imap on strato, all jobs ran fine 11:23, when i change to outlook.office365.com with oauth2 token, i can manually collect just fine, but the cron job only collects the last one “Collect_Ticket_Request”, if i deactivate “Collect_Ticket_Request” then the “Collect_Response_Out” is the only working job.
PS
I had to change two files to get oauth2 with microsoft to work,
/var/www/dolibarr/htdocs/includes/OAuth/OAuth2/Service/Microsoft.php
/var/www/dolibarr/htdocs/core/lib/oauth.lib.php
the scopes needed to be changed from
https ://outlook.office365.com
to
https ://outlook.office.com
Thanks for feedback about oauth2 fix.
Can you confirm this 2 sentences :
If you use https ://outlook.offic.com instead of https ://outlook.office365.com into the 2 mentionned files, the collect work manually for the 3 jobs. But only last when ran by cron, right or wrong ?
If you keep outlook.office365.com, no jobs works, even when ran manually, right or wrong ?
Thanks. So trouble is only from cron. Can you also paste a screenshot of setup of your Home- Setup - Email page ?
What happen if you execute the 3 cron tasks at 2 different hours ?
Note that once an email has been processed by 1 job, it can be processed by another one (it is moved or date of last processed email is modified so old email is not processed twice).
I suppose if i create 3 different Cron jobs it should work, because when i deactivate on or two jobs in the e-mail-Collector the last one is allways the one thats being processed.
To have the email moved into archive, the use must have write permission on the email box and archive dir.
Is your dir ARCHIVE on the same level than INBOX ?
Hi,
I upgrade to Version 19.0.0, now everything is working, even the cron jobs, my problems with the cron job was an incorrect “sent items” folder, it had to be in german “gesendete elemente” and my “Archive” was misspelled, correct was “Archiv”.