Beispiel #1
0
 /**
  * Save a snip email attachment and associated it to a parent email.  Content is base64 encoded.
  *
  */
 protected function processEmailAttachment($data, $email)
 {
     if (substr($data['filename'], -4) === '.ics') {
         require_once 'modules/SNIP/iCalParser.php';
         $ic = new iCalendar();
         try {
             $ic->parse(base64_decode($data['content']));
             $ic->createSugarEvents($email);
         } catch (Exception $e) {
             $GLOBALS['log']->info("Could not process calendar attachment: " . $e->getMessage());
         }
     } else {
         $this->createNote($data, $email);
     }
 }