I have finished rewriting the mailfetch script for osTicket that was dependent on imap c-client functions so it now uses Zen\Mail functions instead.
[ATTACH=CONFIG]5059[/ATTACH]
On the whole it works; however, I have a couple of issues:
When it receives an email and turns it into a ticket, it sends two notification messages to the user that contain the subject line, but have no body content.
I have my setting to move the email message after it have been read to a folder. Right now all it does is mark the message as read.The third option (options 1 & 2 being mark the message as read and move it to an archive folder) is to delete the original message. It is not doing this either.
I believe the segment responsible for the message handling (move, delete, do nothing) is ~lines 640 - 655 and the part for generating the notification email is part of "function createTicket" which starts ~line 523.
If there are other scripts or sections of code that you need to see to figure out what is happening, please let me know. Anything I touched in the script is heavily commented on to explain what was going on. You'll notice that the comments around the segments that are causing issues are sparse and that's because I made very few changes in those areas.
I have been staring at this stuff for months now. I would certainly appreciate a fresh set of eyes looking at it.
class.zmailfetch.txt