5 require_once
'Services/User/classes/class.ilObjUser.php';
6 require_once
'Services/Mail/classes/class.ilMailbox.php';
7 require_once
'Services/Mail/classes/class.ilMail.php';
43 $this->umail =
new ilMail($ilUser->getId());
44 $this->mbox =
new ilMailBox($ilUser->getId());
48 $_GET[
'mobj_id'] = $_POST[
'mobj_id'];
51 if(!(
int)
$_GET[
'mobj_id'])
53 $_GET[
'mobj_id'] = $this->mbox->getInboxFolder();
55 $ilCtrl->saveParameter($this,
'mobj_id');
56 $ilCtrl->setParameter($this,
'mobj_id',
$_GET[
'mobj_id']);
64 $_GET[
"cmd"] =
'editFolder';
67 $this->current_select_cmd =
$_POST[
'select_cmd'];
68 $this->current_selected_cmd =
$_POST[
'selected_cmd'];
70 else if (
$_POST[
"select_cmd2"])
73 $_GET[
"cmd"] =
'editFolder';
74 $this->current_select_cmd =
$_POST[
'select_cmd2'];
75 $this->current_selected_cmd =
$_POST[
'selected_cmd2'];
81 if (
$_GET[
'selected_cmd'] ==
"deleteMails" &&
$_GET[
"mail_id"])
83 $_GET[
"cmd"] =
"editFolder";
84 $this->current_selected_cmd =
"deleteMails";
91 $cmd = $this->ctrl->getCmd();
92 if(
$cmd ==
'changeFolder' &&
93 is_numeric(
$_POST[
'selected_cmd']) &&
96 $this->current_selected_cmd = (int)
$_POST[
'selected_cmd'];
99 $forward_class = $this->ctrl->getNextClass($this);
100 switch($forward_class)
102 case 'ilmailaddressbookgui':
103 include_once
'Services/Contact/classes/class.ilMailAddressbookGUI.php';
108 case 'ilmailoptionsgui':
109 include_once
'Services/Mail/classes/class.ilMailOptionsGUI.php';
114 case 'ilpublicuserprofilegui':
115 include_once(
"Services/User/classes/class.ilPublicUserProfileGUI.php");
116 $this->tpl->setTitle($this->lng->txt(
"mail"));
117 $this->ctrl->saveParameter($this,
"mail_id");
119 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
120 $ret = $this->ctrl->forwardCommand($profile_gui);
123 $this->tpl->setContent(
$ret);
129 if (!(
$cmd = $this->ctrl->getCmd()))
141 global
$lng, $ilUser;
143 if(
$_GET[
"mail_id"] !=
"")
145 if (is_array($mail_data = $this->umail->getMail(
$_GET[
"mail_id"])))
147 require_once
"Services/Contact/classes/class.ilAddressbook.php";
150 $tmp_user =
new ilObjUser($mail_data[
"sender_id"]);
151 if ($abook->checkEntryByLogin($tmp_user->getLogin()) > 0)
157 $abook->addEntry($tmp_user->getLogin(),
158 $tmp_user->getFirstname(),
159 $tmp_user->getLastname(),
160 $tmp_user->getEmail());
181 $this->umail->deleteMailsOfFolder(
$_GET[
"mobj_id"]);
194 if($this->umail->countMailsOfFolder((
int)
$_GET[
'mobj_id']))
197 $this->askForConfirmation =
true;
209 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
211 $this->tpl->setTitle($this->lng->txt(
"mail"));
214 $this->tpl->setVariable(
"TBL_TITLE", $this->lng->txt(
"profile_of").
" ".
217 $this->tpl->setVariable(
"TBL_TITLE_IMG_ALT", $this->lng->txt(
"public_profile"));
219 include_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
221 $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this,
"showMail"));
222 $this->tpl->setContent($ilCtrl->getHTML($profile_gui));
234 $ilToolbar->addSeparator();
237 $ilToolbar->addButton($this->lng->txt(
'mail_add_subfolder'), $this->ctrl->getLinkTarget($this,
'addSubFolder'));
239 if($check_uf ==
true)
241 $ilToolbar->addButton($this->lng->txt(
'rename'), $this->ctrl->getLinkTarget($this,
'renameSubFolder'));
242 $ilToolbar->addButton($this->lng->txt(
'delete'), $this->ctrl->getLinkTarget($this,
'deleteSubFolder'));
251 global $ilUser, $ilToolbar;
253 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
254 $this->tpl->setTitle($this->lng->txt(
'mail'));
256 include_once
'Services/Mail/classes/class.ilMailFolderTableGUI.php';
258 $sentFolderId = $this->mbox->getSentFolder();
259 $draftsFolderId = $this->mbox->getDraftsFolder();
261 $isTrashFolder =
$_GET[
'mobj_id'] == $this->mbox->getTrashFolder();
262 $isSentFolder =
$_GET[
'mobj_id'] == $sentFolderId;
263 $isDraftFolder =
$_GET[
'mobj_id'] == $draftsFolderId;
266 if($this->current_selected_cmd ==
'deleteMails' &&
267 !$this->errorDelete &&
268 $this->current_selected_cmd !=
'confirm' &&
272 foreach((array)
$_REQUEST[
'mail_id'] as $id)
274 $this->tpl->setCurrentBlock(
'mail_ids');
275 $this->tpl->setVariable(
'MAIL_ID_VALUE', $id);
276 $this->tpl->parseCurrentBlock();
279 $this->tpl->setCurrentBlock(
'confirm_delete');
280 $this->tpl->setVariable(
'ACTION', $this->ctrl->getFormAction($this,
'confirmDeleteMails'));
281 $this->tpl->setVariable(
'BUTTON_CONFIRM',$this->lng->txt(
'confirm'));
282 $this->tpl->setVariable(
'BUTTON_CANCEL',$this->lng->txt(
'cancel'));
283 $this->tpl->parseCurrentBlock();
286 $folders = $this->mbox->getSubFolders();
287 $mtree =
new ilTree($ilUser->getId());
291 $check_local =
false;
295 $folder_d = $mtree->getNodeData(
$_GET[
'mobj_id']);
296 if($folder_d[
'm_type'] ==
'user_folder')
300 else if($folder_d[
'm_type'] ==
'local')
307 $mailtable->isSentFolder($isSentFolder)
308 ->isDraftFolder($isDraftFolder)
309 ->isTrashFolder($isTrashFolder)
310 ->setSelectedItems(
$_POST[
'mail_id'])
313 if(!isset(
$_SESSION[ilMailGUI::VIEWMODE_SESSION_KEY]) ||
'tree' !=
$_SESSION[ilMailGUI::VIEWMODE_SESSION_KEY])
315 $folder_options = array();
316 foreach($folders as $folder)
318 $folder_d = $mtree->getNodeData($folder[
'obj_id']);
320 if($folder[
'obj_id'] == $_GET[
'mobj_id'])
322 if($folder[
'type'] ==
'user_folder')
326 else if($folder[
'type'] ==
'local')
333 if($folder[
'type'] ==
'user_folder')
336 for ($i = 2; $i < $folder_d[
'depth'] - 1; $i++)
338 if ($folder_d[
'depth'] > 1)
340 $folder_options[$folder[
'obj_id']] = $pre.
' '.$folder[
'title'];
344 $folder_options[$folder[
'obj_id']] = $this->lng->txt(
'mail_'.$folder[
'title']);
348 if($a_show_confirmation ==
false)
350 if(
'tree' !=
$_SESSION[ilMailGUI::VIEWMODE_SESSION_KEY])
352 $ilToolbar->addText($this->lng->txt(
'mail_change_to_folder'));
353 include_once
'./Services/Form/classes/class.ilSelectInputGUI.php';
355 $si->setOptions($folder_options);
356 $si->setValue($_GET[
'mobj_id']);
357 $ilToolbar->addInputItem($si);
359 $ilToolbar->addFormButton($this->lng->txt(
'change'),
'showFolder');
360 $ilToolbar->setFormAction($this->ctrl->getFormAction($this,
'showFolder'));
362 if($check_local ==
true || $check_uf ==
true)
370 if($mailtable->isTrashFolder() &&
371 $mailtable->getNumerOfMails() > 0)
373 if($this->askForConfirmation ==
true)
375 $this->tpl->setCurrentBlock(
'CONFIRM_EMPTY_TRASH');
376 $this->tpl->setVariable(
'ACTION_EMPTY_TRASH_CONFIRMATION', $this->ctrl->getFormAction($this,
'performEmptyTrash'));
377 $this->tpl->setVariable(
'BUTTON_CONFIRM_EMPTY_TRASH', $this->lng->txt(
'confirm'));
378 $this->tpl->setVariable(
'BUTTON_CANCEL_EMPTY_TRASH', $this->lng->txt(
'cancel'));
379 $this->tpl->parseCurrentBlock();
384 $this->tpl->setVariable(
'MAIL_TABLE', $mailtable->getHtml());
392 $sub_folder = $this->mbox->getFolderData(
$_GET[
'mobj_id']);
393 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
397 $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this,
"showFolder"));
398 $oConfirmationGUI->setHeaderText($this->lng->txt(
"mail_sure_delete_folder"));
399 $oConfirmationGUI->setCancel($this->lng->txt(
"cancel"),
"showFolder");
400 $oConfirmationGUI->setConfirm($this->lng->txt(
"confirm"),
"performDeleteSubfolder");
401 $oConfirmationGUI->addItem(
'',
'', $sub_folder[
'title']);
402 $this->tpl->setVariable(
'CONFIRMATION',$oConfirmationGUI->getHTML());
412 $new_parent = $this->mbox->getParentFolderId(
$_GET[
"mobj_id"]);
414 if ($this->mbox->deleteFolder(
$_GET[
"mobj_id"]))
432 if (empty(
$_POST[
'subfolder_title']))
435 return $this->addSubFolder();
439 $ilCtrl->saveParameter($this,
'mobj_id');
440 $ilCtrl->setParameter($this,
'mobj_id', $mobj_id);
448 $this->addSubFolder();
453 public function addSubFolder()
461 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
463 $tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
464 $tpl->setTitle($this->lng->txt(
'mail'));
467 $oForm->setFormAction($ilCtrl->getFormAction($this,
'performAddSubFolder'));
468 $oForm->setTitle($this->lng->txt(
'mail_add_folder'));
472 $oTitle->setTitle($this->lng->txt(
'title'));
473 $oTitle->setPostVar(
'subfolder_title');
474 $oForm->addItem($oTitle);
476 $oForm->addCommandButton(
'performAddSubFolder', $this->lng->txt(
'save'));
477 $oForm->addCommandButton(
'showFolder', $this->lng->txt(
'cancel'));
479 $tpl->setVariable(
'FORM', $oForm->getHTML());
485 public function renameSubFolder()
493 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
495 $tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail.html',
'Services/Mail');
496 $tpl->setTitle($this->lng->txt(
'mail'));
499 $oForm->setFormAction($ilCtrl->getFormAction($this,
'performRenameSubFolder'));
500 $oForm->setTitle($this->lng->txt(
'mail_rename_folder'));
504 $oTitle->setTitle($this->lng->txt(
'title'));
505 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
506 $oTitle->setValue($tmp_data[
"title"]);
507 $oTitle->setPostVar(
'subfolder_title');
508 $oForm->addItem($oTitle);
510 $oForm->addCommandButton(
'performRenameSubFolder', $this->lng->txt(
'save'));
511 $oForm->addCommandButton(
'showFolder', $this->lng->txt(
'cancel'));
512 $tpl->setVariable(
'FORM', $oForm->getHTML());
522 $tmp_data = $this->mbox->getFolderData(
$_GET[
"mobj_id"]);
523 if ($tmp_data[
"title"] !=
$_POST[
"subfolder_title"])
525 if (
$_POST[
"subfolder_title"] ==
"")
528 return $this->renameSubFolder();
540 return $this->renameSubFolder();
549 switch ($this->current_selected_cmd)
552 if(!(
int)
$_GET[
"mail_id"] || !(
int)$this->current_selected_cmd)
558 if ($this->umail->moveMailsToFolder(array(
$_GET[
"mail_id"]), $this->current_selected_cmd))
561 $this->ctrl->redirectByClass(
"ilMailGUI");
577 switch ($this->current_selected_cmd)
579 case 'markMailsRead':
580 if(is_array(
$_POST[
"mail_id"]))
582 $this->umail->markRead(
$_POST[
"mail_id"]);
589 case 'markMailsUnread':
590 if(is_array(
$_POST[
"mail_id"]))
592 $this->umail->markUnread(
$_POST[
"mail_id"]);
602 if($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"])
604 if(!is_array(
$_POST[
"mail_id"]))
607 $this->errorDelete =
true;
617 if(!is_array(
$_POST[
"mail_id"]))
621 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"], $this->mbox->getTrashFolder()))
634 $this->ctrl->setParameterByClass(
"ilmailoptionsgui",
"cmd",
"add");
635 $this->ctrl->redirectByClass(
"ilmailoptionsgui");
639 if(!is_array(
$_POST[
"mail_id"]))
643 else if($this->umail->moveMailsToFolder(
$_POST[
"mail_id"],$this->current_selected_cmd))
660 if($this->mbox->getTrashFolder() ==
$_GET[
"mobj_id"])
662 if(!is_array(
$_POST[
"mail_id"]))
666 else if($this->umail->deleteMails(
$_POST[
"mail_id"]))
683 $this->ctrl->redirect($this);
696 $this->umail->markRead(array(
$_GET[
"mail_id"]));
698 $mailData = $this->umail->getMail(
$_GET[
"mail_id"]);
700 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.mail_read.html",
"Services/Mail");
701 $this->tpl->setTitle($this->lng->txt(
"mail_mails_of"));
705 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
709 include_once(
"./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
711 if($mailData[
"sender_id"] &&
712 $mailData[
"sender_id"] != ANONYMOUS_USER_ID)
714 $this->ctrl->setParameterByClass(
"ilmailformgui",
"mail_id",
$_GET[
"mail_id"]);
715 $this->ctrl->setParameterByClass(
"ilmailformgui",
"type",
"reply");
716 $this->ctrl->clearParametersByClass(
"iliasmailformgui");
718 $toolbar->addButton($this->lng->txt(
"reply"), $this->ctrl->getLinkTargetByClass(
"ilmailformgui"),
723 $this->ctrl->setParameterByClass(
"ilmailformgui",
"mail_id",
$_GET[
"mail_id"]);
724 $this->ctrl->setParameterByClass(
"ilmailformgui",
"type",
"forward");
725 $this->ctrl->clearParametersByClass(
"iliasmailformgui");
726 $toolbar->addButton($this->lng->txt(
"forward"), $this->ctrl->getLinkTargetByClass(
"ilmailformgui"),
730 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
731 $this->ctrl->setParameter($this,
"cmd",
"printMail");
732 $toolbar->addButton($this->lng->txt(
"print"), $this->ctrl->getLinkTarget($this),
734 $this->ctrl->clearParameters($this);
737 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
738 $this->ctrl->setParameter($this,
"selected_cmd",
"deleteMails");
739 $toolbar->addButton($this->lng->txt(
"delete"), $this->ctrl->getLinkTarget($this),
741 $this->ctrl->clearParameters($this);
743 $this->tpl->setVariable(
"BUTTONS2",$toolbar->getHTML());
745 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
746 $this->tpl->setVariable(
"ACTION", $this->ctrl->getFormAction($this));
747 $this->ctrl->clearParameters($this);
749 if ($mailData[
"sender_id"] &&
750 $mailData[
"sender_id"] != $ilUser->getId() &&
751 $mailData[
"sender_id"] != ANONYMOUS_USER_ID)
753 require_once
"Services/Contact/classes/class.ilAddressbook.php";
755 $tmp_user =
new ilObjUser($mailData[
"sender_id"]);
756 if ($abook->checkEntryByLogin($tmp_user->getLogin()) == 0)
760 $tplbtn->setCurrentBlock(
"btn_cell");
761 $this->ctrl->setParameter($this,
"mail_id",
$_GET[
"mail_id"]);
762 $this->ctrl->setParameter($this,
"cmd",
"add");
763 $tplbtn->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this));
764 $this->ctrl->clearParameters($this);
765 $tplbtn->setVariable(
"BTN_TXT", $this->lng->txt(
"mail_add_to_addressbook"));
768 $this->tpl->setVariable(
"ADD_USER_BTN",
$tplbtn->get());
776 if($mailData[
"sender_id"] != ANONYMOUS_USER_ID)
778 $tmp_user =
new ilObjUser($mailData[
'sender_id']);
779 $this->ctrl->setParameter($this,
'mail_id',
$_GET[
'mail_id']);
780 $this->ctrl->setParameter($this,
'user', $tmp_user->getId());
783 $this->tpl->setVariable(
'PROFILE_LINK_FROM', $this->ctrl->getLinkTarget($this,
'showUser'));
784 $this->tpl->setVariable(
'FROM', $tmp_user->getFullname());
786 $this->tpl->setCurrentBlock(
"pers_image");
787 $this->tpl->setVariable(
"IMG_SENDER", $tmp_user->getPersonalPicturePath(
"xsmall"));
788 $this->tpl->setVariable(
"ALT_SENDER", $tmp_user->getFullname());
789 $this->tpl->parseCurrentBlock();
790 $this->tpl->setCurrentBlock(
"adm_content");
791 if(!($login = $tmp_user->getLogin()))
793 $login = $mailData[
"import_name"].
" (".$this->lng->txt(
"user_deleted").
")";
795 $this->tpl->setVariable(
"MAIL_LOGIN",$login);
796 $this->tpl->setVariable(
"CSSROW_FROM", (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
800 $tmp_user =
new ilObjUser(ANONYMOUS_USER_ID);
801 $this->tpl->setVariable(
'MAIL_LOGIN', ilMail::_getIliasMailerName());
802 $this->tpl->setCurrentBlock(
'pers_image');
804 $this->tpl->setVariable(
'ALT_SENDER', ilMail::_getIliasMailerName());
805 $this->tpl->parseCurrentBlock();
808 $this->tpl->setVariable(
'TXT_FROM', $this->lng->txt(
'from'));
811 $this->tpl->setVariable(
'TXT_TO', $this->lng->txt(
'mail_to'));
814 $this->tpl->setVariable(
'CSSROW_TO', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
817 if($mailData[
'rcp_cc'])
819 $this->tpl->setCurrentBlock(
'cc');
820 $this->tpl->setVariable(
'TXT_CC',$this->lng->txt(
'cc'));
823 $this->tpl->setVariable(
'CSSROW_CC', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
824 $this->tpl->parseCurrentBlock();
828 if($mailData[
'rcp_bcc'])
830 $this->tpl->setCurrentBlock(
'bcc');
831 $this->tpl->setVariable(
'TXT_BCC',$this->lng->txt(
'bc'));
834 $this->tpl->setVariable(
'CSSROW_BCC', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
835 $this->tpl->parseCurrentBlock();
839 $this->tpl->setVariable(
'TXT_SUBJECT', $this->lng->txt(
'subject'));
842 $this->tpl->setVariable(
'CSSROW_SUBJ', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
845 $this->tpl->setVariable(
'TXT_DATE', $this->lng->txt(
'date'));
847 $this->tpl->setVariable(
'CSSROW_DATE', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
850 if($mailData[
'attachments'])
852 $this->tpl->setCurrentBlock(
'attachment');
853 $this->tpl->setCurrentBlock(
'a_row');
855 foreach($mailData[
'attachments'] as
$file)
857 $this->tpl->setVariable(
'A_CSSROW', (++$counter) % 2 ?
'tblrow1' :
'tblrow2');
858 $this->tpl->setVariable(
'FILE', md5($file));
859 $this->tpl->setVariable(
'FILE_NAME', $file);
860 $this->tpl->parseCurrentBlock();
862 $this->tpl->setVariable(
'TXT_ATTACHMENT', $this->lng->txt(
'attachments'));
863 $this->tpl->setVariable(
'TXT_DOWNLOAD', $this->lng->txt(
'download'));
864 $this->tpl->parseCurrentBlock();
868 $this->tpl->setVariable(
'TXT_MESSAGE', $this->lng->txt(
'message'));
873 $isTrashFolder =
false;
874 if ($this->mbox->getTrashFolder() ==
$_GET[
'mobj_id'])
876 $isTrashFolder =
true;
882 $selectOptions = array();
883 $actions = $this->mbox->getActions(
$_GET[
"mobj_id"]);
884 foreach($actions as $key => $action)
886 if($key ==
'moveMails')
888 $folders = $this->mbox->getSubFolders();
889 foreach($folders as $folder)
891 if ($folder[
"type"] !=
'trash' ||
895 if($folder[
'type'] !=
'user_folder')
897 $optionText = $action.
' '.$this->lng->txt(
'mail_'.$folder[
'title']).($folder[
'type'] ==
'trash' ?
' ('.$this->lng->txt(
'delete').
')' :
'');
901 $optionText = $action.
' '.$folder[
'title'];
904 $selectOptions[$folder[
'obj_id']] = $optionText;
909 if(is_array($selectOptions) && count($selectOptions))
911 include_once
'Services/Form/classes/class.ilSelectInputGUI.php';
913 $oActionSelectBox->setOptions($selectOptions);
914 $oBottomToolbar->addInputItem($oActionSelectBox);
915 $oBottomToolbar->addFormButton($this->lng->txt(
'submit'),
'changeFolder');
919 $prevMail = $this->umail->getPreviousMail(
$_GET[
'mail_id']);
920 $nextMail = $this->umail->getNextMail(
$_GET[
'mail_id']);
921 if(is_array($prevMail) || is_array($nextMail))
923 $oBottomToolbar->addSeparator();
925 if($prevMail[
'mail_id'])
927 $this->ctrl->setParameter($this,
'mail_id', $prevMail[
'mail_id']);
928 $this->ctrl->setParameter($this,
'cmd',
'showMail');
929 $oBottomToolbar->addButton($this->lng->txt(
'previous'), $this->ctrl->getLinkTarget($this));
930 $this->ctrl->clearParameters($this);
933 if($nextMail[
'mail_id'])
935 $this->ctrl->setParameter($this,
'mail_id', $nextMail[
'mail_id']);
936 $this->ctrl->setParameter($this,
'cmd',
'showMail');
937 $oBottomToolbar->addButton($this->lng->txt(
'next'), $this->ctrl->getLinkTarget($this));
938 $this->ctrl->clearParameters($this);
942 $this->tpl->setVariable(
'MAIL_NAVIGATION', $oBottomToolbar->getHTML());
948 $tplprint =
new ilTemplate(
"Services/Mail/templates/default/tpl.mail_print.html",
true,
true,
true);
949 $tplprint->setVariable(
"JSPATH",$tpl->tplPath);
952 $mailData = $this->umail->getMail(
$_GET[
"mail_id"]);
956 if($mailData[
"sender_id"] != ANONYMOUS_USER_ID)
958 $tmp_user =
new ilObjUser($mailData[
"sender_id"]);
959 if(!($login = $tmp_user->getFullname()))
961 $login = $mailData[
"import_name"].
" (".$this->lng->txt(
"user_deleted").
")";
963 $tplprint->setVariable(
"FROM", $login);
967 $tplprint->setVariable(
'FROM', ilMail::_getIliasMailerName());
970 $tplprint->setVariable(
'TXT_FROM', $this->lng->txt(
'from'));
973 $tplprint->setVariable(
"TXT_TO", $this->lng->txt(
"mail_to"));
974 $tplprint->setVariable(
"TO", $mailData[
"rcp_to"]);
977 if($mailData[
"rcp_cc"])
979 $tplprint->setCurrentBlock(
"cc");
980 $tplprint->setVariable(
"TXT_CC",$this->lng->txt(
"cc"));
981 $tplprint->setVariable(
"CC",$mailData[
"rcp_cc"]);
982 $tplprint->parseCurrentBlock();
985 $tplprint->setVariable(
"TXT_SUBJECT",$this->lng->txt(
"subject"));
986 $tplprint->setVariable(
"SUBJECT",htmlspecialchars($mailData[
"m_subject"]));
989 $tplprint->setVariable(
"TXT_DATE", $this->lng->txt(
"date"));
994 $tplprint->setVariable(
"TXT_MESSAGE", $this->lng->txt(
"message"));
995 $tplprint->setVariable(
"MAIL_MESSAGE", nl2br(htmlspecialchars($mailData[
"m_message"])));
1013 :
$_GET[
"filename"]));
1018 require_once
"classes/class.ilFileDataMail.php";
1024 if(!is_array(
$file = $mfile->getAttachmentPathByMD5Filename(
$filename,
$_GET[
'mail_id'])))