Ik heb een SupportTrio script geinstalleerd op een account en hierin bestaat de mogelijkheid om mails op een of andere manier via pop3 binnen te halen naar het supportticket systeem. Dit moet met behulp van cronjobs die om de X minuten kijkt of er mail is op de pop3.
Iemand enig idee hoe ik dit in moet stellen.
Dit is de code van php die de cronjob uit zou moeten voeren:
PHP Code:#!/usr/local/lib/php -q
<?php
/*
Cronjob For Checking POP Accounts
The first line of this file should be modified to the path of php on your server.
The rest of this file should remain unedited.
*/
error_reporting(E_ALL);
// set admin path
$adminPath = dirname(dirname(__FILE__));
$publicPath = dirname($adminPath);
// require main include file
require_once($adminPath . '/engine.inc.php');
set_include_path('.');
// Setting some php settings to avoid timeouts
@ini_set('max_execution_time', 950 * 60);
$ml = ini_get('memory_limit');
if ( $ml != 0 and (int)$ml < 64 ) @ini_set('memory_limit', '64M');
@set_time_limit(950 * 60);
// include everything we need
require_once($publicPath . '/functions/function_global.php');
require_once($adminPath . '/functions/function_global.php');
require_once($adminPath . '/functions/function_cron.php');
require_once($adminPath . '/functions/function_user.php');
require_once($adminPath . '/functions/function_ticket.php');
require_once($adminPath . '/functions/function_spam.php');
require_once($adminPath . '/functions/function_user.php');
require_once($adminPath . '/functions/mimeDecode.php');
require_once($adminPath . '/functions/POP3.php');
require_once($adminPath . '/functions/DatabaseTicketFile.php');
require_once($adminPath . '/functions/smarty.php');
require_once($adminPath . '/functions/smarty_plugins/modifier.i18n.php');
$site = tt_version();
// fetch installed languages
$languages = get_languages();
// change language if not found
if ( !isset($languages[$site['lang']]) ) $site['lang'] = 'english';
// Preload the language file
$langSet = ( isset($languages[$site['lang']]) ? $site['lang'] : 'english' );
$langFile = dirname(dirname(dirname(__FILE__))) . '/lang/lang.' . $langSet . '.txt';
// This function is from the smarty modifier php file
setLanguageArray( loadSmartyLangFile($langFile) );
define('PRINT_OUTPUT', false); // set to true if you want to see output what's happening (when accessing via browser)
// Running Pop Account Function
run_pop_accounts($site);
?>

Likes:


Quote