Example #1
0
 /**
  * Function to scan this record
  * @return <Boolean> true/false (Scaned/Not)
  */
 public function scanNow()
 {
     $isValid = $this->get('isvalid');
     if ($isValid) {
         vimport('~~modules/Settings/MailConverter/handlers/MailScannerInfo.php');
         vimport('~~modules/Settings/MailConverter/handlers/MailScanner.php');
         $scannerInfo = new Vtiger_MailScannerInfo($this->getName());
         /** Start the scanning. */
         $scanner = new Vtiger_MailScanner($scannerInfo);
         $status = $scanner->performScanNow();
         return $status;
     }
     return false;
 }
Example #2
0
 /**
  * Function to scan this record
  * @return <Boolean> true/false (Scaned/Not)
  */
 public function scanNow()
 {
     $isValid = $this->get('isvalid');
     if ($isValid) {
         vimport('~~modules/Settings/MailConverter/handlers/MailScannerInfo.php');
         vimport('~~modules/Settings/MailConverter/handlers/MailScanner.php');
         $scannerInfo = new Vtiger_MailScannerInfo($this->getName());
         $folders = $scannerInfo->getFolderInfo();
         //dont ignore inbox folder
         unset($folders['INBOX']);
         $ignoredFolders = array_keys($folders);
         /** Start the scanning. */
         $scanner = new Vtiger_MailScanner($scannerInfo);
         $scanner->_generalIgnoreFolders = $ignoredFolders;
         $scanner->performScanNow();
         return true;
     }
     return false;
 }