Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Using Zend Framework instead of IMAP functions

My host will not install/activate the imap extension on our web server account and our e-mail is handled through Gmail, so despite my best efforts, we are unable to use piping and need to rely on traditional fetching for osTicket to receive e-mails and attach them to tickets (either new or existing). We're pretty well tied to our host, so I have replaced all of the imap functions in class.mailfetch.php with zend mail functions. I made a few modifications to too (to stop looking for imap_open to confirm that the imap extension is enabled). After a lot of trial and error, I think I finally have everything in place, except when I enable the Mail Account information the save fails. It tells me "Invalid login. Check IMAP settings" and "Array" (the latter is because I replaced imap_last_error with error_get_last and I'm not sure that's right). I know that my IMAP settings work because I created a test script I would try various steps along the way and it does indeed log into Gmail correctly and can read the Inbox just fine. The only real difference was that I hardcoded my login information to the test script. 

The only other thing is I added a line (at line 66) to to define the directory location for the Zend Framework. That line looks like this: 

    define('ZEND_DIR',INCLUDE_DIR.'zf2/'); //Composer built ZendFramework-2.2.5 essentials

My modified and class.mailfetch.php files are attached (extention has been changed from php to txt to allow the upload). 

Would someone mind running through these and seeing if you can figure out why it thinks I have errors with my Gmail login?


  • I don't see the files attached, so here they are again just in case: image
    class.mailfetch.php: image

  • For the record: 

    OS Ticket Version: 1.7.2
    From phpinfo:
    System: Linux 2.6.32-50-server #112-Ubuntu SMP Tue Jul 9 20:45:08 UTC 2013 x86_64
    Host: x86_64-pc-linux-gnu
    SSL Version: OpenSSL/0.9.8k
    PHP Version: 5.3.27
    Configuration File (php.ini) Path: /usr/local/etc/php53
    Loaded Configuration File: /usr/home/[username]/public_html/fcgi-bin/php.ini

    Anything else, please ask here or PM me. 
Sign In or Register to comment.