$mailSubject['vis'] = ''; $mailTemps['staff'] = PATH . 'content/language/' . $SETTINGS->language . '/mail-templates/ticket-reply.txt'; $mailTemps['admin'] = PATH . 'content/language/' . $SETTINGS->language . '/mail-templates/ticket-reply.txt'; $mailTemps['vis'] = ''; $pipes[2] = ++$pipes[2]; } else { $MSIMAP->log('Fatal error, reply could not added: ' . mysql_error()); } } else { $MSIMAP->log('Permission denied. Ticket is closed or was flagged as spam and hasn`t been accepted. If so, reply is not accepted'); } } // Attachments.. $MSIMAP->log('Check for attachments..'); if ($IMDT->im_attach == 'yes' && isset($T->id)) { $attachments = $MSIMAP->readAttachments($mailbox, $i); $MSIMAP->log(count($attachments) . ' attachment(s) found'); if (!empty($attachments) && LICENCE_VER == 'locked' && count($attachments) > RESTR_ATTACH) { $countOfBoxes = RESTR_ATTACH; } if (!empty($attachments)) { $restrictions = array('Rename' => ucfirst($SETTINGS->rename), 'FileTypes' => $SETTINGS->filetypes ? $SETTINGS->filetypes : 'No Restrictions (Not recommended)', 'MaxSize' => $SETTINGS->maxsize > 0 ? mswFileSizeConversion($SETTINGS->maxsize) : 'No Limits'); $MSIMAP->log('Restrictions Imposed: {nl}{nl}' . print_r($restrictions, true)); $MSIMAP->log('Preparing to loop and check attachment(s)'); for ($j = 0; $j < (isset($countOfBoxes) ? $countOfBoxes : count($attachments)); $j++) { ++$aCount; $MSIMAP->log('Check Attachment: ' . $attachments[$aCount]['file']); // Check for valid file type.. if ($MSTICKET->type($attachments[$aCount]['file'])) { $n = $SETTINGS->rename == 'yes' ? $MSTICKET->rename($attachments[$aCount]['file'], $ID, $replyID, $j + 1) : $attachments[$aCount]['file']; // At this point we must upload the file to get file size..