Skip to content
Snippets Groups Projects
pipe.php 942 B
Newer Older
  • Learn to ignore specific revisions
  • Jared Hancock's avatar
    Jared Hancock committed
    #!/usr/bin/php -q
    <?php
    /*********************************************************************
        pipe.php
    
    
        Converts piped emails to ticket. Just local - remote must use /api/tickets.email
    
    Jared Hancock's avatar
    Jared Hancock committed
    
        Peter Rotich <peter@osticket.com>
        Copyright (c)  2006-2012 osTicket
        http://www.osticket.com
    
        Released under the GNU General Public License WITHOUT ANY WARRANTY.
        See LICENSE.TXT for details.
    
        vim: expandtab sw=4 ts=4 sts=4:
    **********************************************************************/
    
    
    //Only local piping supported via pipe.php
    if (substr(php_sapi_name(), 0, 3) != 'cli')
        die('pipe.php only supports local piping - use http -> api/tickets.email');
    
    ini_set('memory_limit', '256M'); //The concern here is having enough mem for emails with attachments.
    @chdir(realpath(dirname(__FILE__)).'/'); //Change dir.
    require('api.inc.php');
    require_once(INCLUDE_DIR.'api.tickets.php');
    PipeApiController::process();
    
    Jared Hancock's avatar
    Jared Hancock committed
    ?>