/**
  * Get Mails
  */
 function getMails()
 {
     global $ilUser;
     // BEGIN MAILS
     $umail = new ilMail($_SESSION["AccountId"]);
     $mbox = new ilMailBox($_SESSION["AccountId"]);
     $inbox = $mbox->getInboxFolder();
     //SHOW MAILS FOR EVERY USER
     $this->mails = $umail->getMailsOfFolder($inbox, array('status' => 'unread', 'type' => 'system'));
 }
 /**
  * delete mail
  */
 public function deleteMail()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule('mail');
     $umail = new ilMail($_SESSION['AccountId']);
     $mbox = new ilMailBox($_SESSION['AccountId']);
     if (!$_GET['mobj_id']) {
         $_GET['mobj_id'] = $mbox->getInboxFolder();
     }
     if ($umail->moveMailsToFolder(array($_GET['mail_id']), $mbox->getTrashFolder())) {
         ilUtil::sendInfo($lng->txt('mail_moved_to_trash'), true);
     } else {
         ilUtil::sendInfo($lng->txt('mail_move_error'), true);
     }
     $ilCtrl->redirectByClass('ilpersonaldesktopgui', 'show');
 }