Just found the mail function for the script....
This is in a conf.php
// MAIL FUNCTION FOR ExoPHPDesk
function mail_it( $type='', $to, $subject, $ext='', $name='', $tid='', $message='', $title = '' )
{
global $tpl_dir,$class,$_POST,$email, $site_name;
$headers = "From: {$site_name}<{$email}>\r\n"
."Reply-To: {$email}\r\n"
."X-Mailer: PHP";
_parse($tpl_dir.'mail.tpl') ;
$read = $class->read;
if($type == 'register')
{
$pos = (strpos($read, '[#'.$type)+strlen($type)+2);
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^user^', $_POST['username'], str_replace('^name^', $_POST['name'], $read));
$read = str_replace('^pass^', $_POST['password'], $read);
mail($to,$subject,$read,$headers);
}
elseif($type == 'staff')
{
$pos = (strpos($read, '[#'.$type)+strlen($type)+2);
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^user^', $_POST['username'], str_replace('^name^', $_POST['name'], $read));
$read = str_replace('^pass^', $_POST['password'], $read);
mail($to,$subject,$read,$headers);
}
elseif($type == 'newpm')
{
$pos = (strpos($read, '[#'.$type)+strlen($type)+2);
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^name^', $name, str_replace('^php_file^', $ext, $read));
mail($to,$subject,$read,$headers);
}
elseif($type == 'newresponse')
{
$pos = (strpos($read, '[#'.$type)+strlen($type)+2);
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^name^', $name, str_replace('^php_file^', 'member.php', $read));
$message = stripslashes( $message );
$read = str_replace('^tid^', $tid, str_replace( '^message^', $message, $read ) );
mail($to,$subject,$read,$headers);
}
elseif($type == 'newticket')
{
$pos = (strpos($read, '[#'.$type) + strlen($type)+2 );
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^name^', $name, str_replace('^department^', $ext, $read));
$read = rpl( '^TITLE^', $title, rpl( '^MESSAGE^', $message, $read ));
mail($to,$subject,$read,$headers);
}
elseif($type == 'lostpass')
{
$pos = (strpos($read, '[#'.$type)+strlen($type)+2);
$read = substr($read, $pos);
$pos = strpos($read, '/#'.$type.']');
$read = substr($read, 0, $pos);
$read = str_replace('^name^', $name, str_replace('^key^', $ext, $read));
mail($to,$subject,$read,$headers);
}
elseif($type == 'pipe_tcreate')
{
$data = template($read, '[#'.$type, '/#'.$type.']');
$data = rpl(array('subject' => $title, 'message' => $message, 'tid' => $tid), '^', $data);
mail($to,$subject,$data,$headers);
}
elseif($type == '' && $message != '')
{
mail($to,$subject,$message,$headers);
}
}