ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilMailFormGUI Class Reference

@ilCtrl_Calls ilMailFormGUI: ilMailAttachmentGUI, ilMailSearchGUI, ilMailSearchCoursesGUI, ilMailSearchGroupsGUI, ilMailingListsGUI, ilMailFormUploadHandlerGUI @ilCtrl_Calls ilMailFormGUI: ILIAS\User\Search\EndpointGUI More...

+ Collaboration diagram for ilMailFormGUI:

Public Member Functions

 executeCommand ()
 
 saveMessageToOutbox (array $form_values, Form $form)
 
 sendMessage ()
 
 saveDraft ()
 
 searchUsers (bool $save=true)
 
 searchCoursesTo ()
 
 searchGroupsTo ()
 
 search ()
 
 cancelSearch ()
 
 editAttachments ()
 
 returnFromAttachments ()
 
 searchResults ()
 
 mailUser ()
 
 mailRole ()
 
 replyMail ()
 
 mailAttachment ()
 
 showForm (?Form $form=null)
 
 lookupRecipientAsync ()
 
 cancelMail ()
 
 searchMailingListsTo ()
 

Data Fields

final const string MAIL_FORM_TYPE_ATTACH = 'attach'
 
final const string MAIL_FORM_TYPE_SEARCH_RESULT = 'search_res'
 
final const string MAIL_FORM_TYPE_NEW = 'new'
 
final const string MAIL_FORM_TYPE_ROLE = 'role'
 
final const string MAIL_FORM_TYPE_REPLY = 'reply'
 
final const string MAIL_FORM_TYPE_ADDRESS = 'address'
 
final const string MAIL_FORM_TYPE_FORWARD = 'forward'
 
final const string MAIL_FORM_TYPE_DRAFT = 'draft'
 
final const string MAIL_FORM_TYPE_OUTBOX = 'outbox'
 
final const string PARAM_SCHEDULED_EDIT_FROM_OUTBOX = 'scheduled_edit_from_outbox'
 
final const string MAIL_FORM_MODE_REGULAR_MAIL = 'regular_mail'
 
final const string MAIL_FORM_MODE_SERIAL_LETTER = 'serial_letter'
 

Protected Member Functions

 getTemplateDataById ()
 
 tryHandleAttachments (array $attachments, ?Form $form=null)
 
 showSubmissionErrors (array $errors)
 
 buildForm (?array $mail_data=null)
 
 buildFormElements (?array $mail_data)
 
 addToolbarButtons (Form $form)
 

Protected Attributes

ilMailTemplateService $template_service
 

Private Member Functions

 getQueryParam (string $name, Transformation $trafo, $default=null)
 
 getBodyParam (string $name, Transformation $trafo, $default=null)
 
 resetStage ()
 
 getOwnMailOrRedirect (int $mail_id)
 
 saveMailBeforeSearch (?array $input_results=null)
 
 getUserSearchConfigurator ()
 
 mailFormToolbarDelegatedSubmitJs (string $toolbar_button_id, string $form_action)
 
 toggleMailMode ()
 

Private Attributes

readonly ilGlobalTemplateInterface $tpl
 
readonly ilCtrlInterface $ctrl
 
readonly ilLanguage $lng
 
readonly ilObjUser $user
 
readonly ilTabsGUI $tabs
 
readonly ilToolbarGUI $toolbar
 
readonly ilFormatMail $umail
 
readonly ilMailbox $mbox
 
readonly ilFileDataMail $mfile
 
readonly GlobalHttpState $http
 
readonly Refinery $refinery
 
MailAttachments $request_attachments = null
 
readonly ilMailBodyPurifier $purifier
 
string $mail_form_type = ''
 
readonly Factory $ui_factory
 
readonly Renderer $ui_renderer
 
readonly Psr Http Message ServerRequestInterface $request
 
readonly ArrayBasedRequestWrapper $post
 
readonly ArrayBasedRequestWrapper $query
 
readonly ilMailFormUploadHandlerGUI $upload_handler
 
readonly ilFileDataMail $fdm
 
readonly ILIAS ResourceStorage Services $storage
 
readonly ilSetting $settings
 
readonly ILIAS User Search Search $user_search
 
readonly ClockFactory $clock
 

Detailed Description

Member Function Documentation

◆ addToolbarButtons()

ilMailFormGUI::addToolbarButtons ( Form  $form)
protected

Definition at line 1338 of file class.ilMailFormGUI.php.

1338 : void
1339 {
1340 $bf = $this->ui_factory->button();
1341
1342 $result = $form->getInputGroup()->getInputs()[0]->getInputs();
1343 $use_placeholders = (bool) $result['use_placeholders']->getValue();
1344 $action = $this->ctrl->getFormAction($this, 'toggleMailMode');
1345 $url_builder = new UrlBuilder(new URI(ILIAS_HTTP_PATH . '/' . $action));
1346 [$url_builder, $mail_mode_parameter] = $url_builder->acquireParameter(['mail', 'form'], 'mail_mode');
1347
1348 $btn = $this->ui_factory->viewControl()->mode(
1349 [
1350 $this->lng->txt(self::MAIL_FORM_MODE_REGULAR_MAIL) => (string) $url_builder->withParameter(
1351 $mail_mode_parameter,
1352 self::MAIL_FORM_MODE_REGULAR_MAIL
1353 )->buildURI(),
1354 $this->lng->txt(self::MAIL_FORM_MODE_SERIAL_LETTER) => (string) $url_builder->withParameter(
1355 $mail_mode_parameter,
1356 self::MAIL_FORM_MODE_SERIAL_LETTER
1357 )->buildURI(),
1358 ],
1359 'mail_mode_switch_label'
1360 )->withActive(
1361 $this->lng->txt($use_placeholders ? self::MAIL_FORM_MODE_SERIAL_LETTER : self::MAIL_FORM_MODE_REGULAR_MAIL)
1362 );
1363
1364 $this->toolbar->addComponent($btn);
1365 $this->toolbar->addSeparator();
1366
1367 $this->tpl->addOnLoadCode(
1368 "document.getElementById('{$this->toolbar->getId()}')
1369 .querySelector('div[aria-label=\"" . $this->lng->txt('mail_mode_switch_label') . "\"]')
1370 .querySelectorAll('button[data-action]').forEach(function(button) {
1371 button.addEventListener('click', function(event) {
1372 event.preventDefault();
1373 event.stopPropagation();
1374 event.stopImmediatePropagation();
1375
1376 let mailform = document.querySelector('form.c-form');
1377 let action = button.getAttribute('data-action');
1378 if (action && mailform) {
1379 let submitBtn = mailform.querySelector('button[type=\"submit\"]');
1380 if (submitBtn) {
1381 submitBtn.formAction = action;
1382 mailform.requestSubmit(submitBtn);
1383 } else {
1384 mailform.action = action;
1385 mailform.submit();
1386 }
1387 }
1388 return false;
1389 }, true);
1390 });"
1391 );
1392
1393 $action = $this->ctrl->getFormAction($this, 'searchUsers');
1394 $btn = $bf->standard(
1395 $this->lng->txt('search_recipients'),
1396 ''
1397 )->withAdditionalOnLoadCode(
1398 fn(string $id): string => $this->mailFormToolbarDelegatedSubmitJs($id, $action)
1399 );
1400
1401 $this->toolbar->addComponent($btn);
1402
1403 $action = $this->ctrl->getFormAction($this, 'searchCoursesTo');
1404 $btn = $bf->standard(
1405 $this->lng->txt('mail_my_courses'),
1406 ''
1407 )->withAdditionalOnLoadCode(
1408 fn(string $id): string => $this->mailFormToolbarDelegatedSubmitJs($id, $action)
1409 );
1410 $this->toolbar->addComponent($btn);
1411
1412 $action = $this->ctrl->getFormAction($this, 'searchGroupsTo');
1413 $btn = $bf->standard(
1414 $this->lng->txt('mail_my_groups'),
1415 ''
1416 )->withAdditionalOnLoadCode(
1417 fn(string $id): string => $this->mailFormToolbarDelegatedSubmitJs($id, $action)
1418 );
1419 $this->toolbar->addComponent($btn);
1420
1421 if (count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) > 0) {
1422 $action = $this->ctrl->getFormAction($this, 'searchMailingListsTo');
1423 $btn = $bf->standard(
1424 $this->lng->txt('mail_my_mailing_lists'),
1425 ''
1426 )->withAdditionalOnLoadCode(
1427 fn(string $id): string => $this->mailFormToolbarDelegatedSubmitJs($id, $action)
1428 );
1429 $this->toolbar->addComponent($btn);
1430 }
1431
1432 $this->toolbar->addSeparator();
1433
1434 $action = $this->ctrl->getFormAction($this, 'editAttachments');
1435 $btn = $bf->standard(
1436 $this->lng->txt('edit_attachments'),
1437 ''
1438 )->withAdditionalOnLoadCode(
1439 fn(string $id): string => $this->mailFormToolbarDelegatedSubmitJs($id, $action)
1440 );
1441 $this->toolbar->addComponent($btn);
1442 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
The scope of this class is split ilias-conform URI's into components.
Definition: URI.php:35
static getInstanceByGlobalUser(?ilObjUser $user=null)
mailFormToolbarDelegatedSubmitJs(string $toolbar_button_id, string $form_action)
getInputs()
Get the inputs contained in the container.
getValue()
Get the value that is displayed in the input client side.
Definition: Group.php:49

References $id, ILIAS\Repository\ctrl(), ILIAS\UI\Component\Input\Container\Container\getInputs(), ilBuddyList\getInstanceByGlobalUser(), ILIAS\UI\Implementation\Component\Input\getValue(), ILIAS\Repository\lng(), mailFormToolbarDelegatedSubmitJs(), and ILIAS\Repository\toolbar().

Referenced by showForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildForm()

ilMailFormGUI::buildForm ( ?array  $mail_data = null)
protected

Definition at line 1070 of file class.ilMailFormGUI.php.

1070 : Form
1071 {
1072 return $this->ui_factory->input()->container()->form()->standard(
1073 $this->ctrl->getFormAction($this, 'sendMessage'),
1074 $this->buildFormElements($mail_data)
1076 $this->ctrl->getFormAction($this, 'saveDraft'),
1077 $this->lng->txt('save_message')
1078 )->withSubmitLabel($this->lng->txt('send_mail'));
1079 }
This describes commonalities between all forms.
Definition: Form.php:34
withAdditionalFormAction(string $action, string $label)
Get a form container like this, but provide an additional form action which will be displayed as an a...

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\UI\Component\Input\Container\Form\Form\withAdditionalFormAction().

Referenced by saveDraft(), saveMailBeforeSearch(), sendMessage(), showForm(), and toggleMailMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFormElements()

ilMailFormGUI::buildFormElements ( ?array  $mail_data)
protected

Definition at line 1086 of file class.ilMailFormGUI.php.

1086 : array
1087 {
1088 $mail_data ??= [];
1089 $ff = $this->ui_factory->input()->field();
1090
1091 $rcp_to = $this->user_search->getInput(
1092 $this->lng->txt('mail_to'),
1093 $this->getUserSearchConfigurator()
1094 )->withRequired(true, $this->refinery->logical()->sequential([
1095 $this->refinery->logical()->not($this->refinery->null()),
1096 $this->refinery->string()->hasMinLength(1)
1097 ])->withProblemBuilder(function ($txt) {
1098 return $txt('mail_add_recipient');
1099 }));
1100 $rcp_cc = $this->user_search->getInput(
1101 $this->lng->txt('mail_cc'),
1103 );
1104 $rcp_bcc = $this->user_search->getInput(
1105 $this->lng->txt('mail_bcc'),
1107 );
1108
1109 if (!is_null($mail_data)) {
1110 if (isset($mail_data['rcp_to']) && $mail_data['rcp_to'] != '') {
1111 $rcp_to = $rcp_to->withValue(explode(',', $mail_data['rcp_to']) ?? (array) $mail_data['rcp_to']);
1112 }
1113 if (isset($mail_data['rcp_cc']) && $mail_data['rcp_cc'] != '') {
1114 $rcp_cc = $rcp_cc->withValue(explode(',', $mail_data['rcp_cc']) ?? (array) $mail_data['rcp_cc']);
1115 }
1116 if (isset($mail_data['rcp_bcc']) && $mail_data['rcp_bcc'] != '') {
1117 $rcp_bcc = $rcp_bcc->withValue(explode(',', $mail_data['rcp_bcc']) ?? (array) $mail_data['rcp_bcc']);
1118 }
1119 }
1120
1121 $attachments = $ff->file(
1122 $this->upload_handler,
1123 $this->lng->txt('attachments')
1124 )->withMaxFiles(10);
1125
1126 $attachment_total_size_limit = $this->fdm->getAttachmentsTotalSizeLimit();
1127 if ($attachment_total_size_limit !== null) {
1128 $attachments = $attachments->withMaxFileSize((int) $attachment_total_size_limit);
1129 }
1130
1131 $mail_attachments = $mail_data['attachments'] ?? null;
1132 if ($mail_attachments instanceof MailAttachments && !$mail_attachments->isEmpty()) {
1133 // Legacy pool attachments are converted to IRSS once when the mail is read (ilMail::fetchMailData),
1134 // creating collections while rendering would leave an orphaned copy behind on every request
1135 $mail_data['attachments'] = $mail_attachments->isIrss()
1136 ? $this->FilesFromIRSSToLegacy($mail_attachments->rcid())
1137 : [];
1138 $attachments = $attachments->withValue($mail_data['attachments']);
1139 } elseif (is_array($mail_attachments) && $mail_attachments !== []) {
1140 $attachments = $attachments->withValue($mail_attachments);
1141 }
1142
1143 $template_chb = null;
1144 $signal = null;
1145 $use_placeholder_value = false;
1146 $context = new ilMailTemplateGenericContext();
1148 $context_id = ilMailFormCall::getContextId();
1149
1150 try {
1152 $use_placeholder_value = true;
1153
1154 $templates = $this->template_service->loadTemplatesForContextId($context->getId());
1155 if (!empty($templates)) {
1156 $options = [];
1157
1158 $tmpl_value = '';
1159 $signal_generator = new ILIAS\UI\Implementation\Component\SignalGenerator();
1160 $signal = $signal_generator->create();
1161 foreach ($templates as $template) {
1162 $options[$template->getTplId()] = $template->getTitle();
1163 $signal->addOption($template->getTplId() . '_subject', urlencode($template->getSubject()));
1164 $signal->addOption($template->getTplId() . '_message', urlencode($template->getMessage()));
1165
1166 if (!isset($mail_data['template_id']) && $template->isDefault()) {
1167 $tmpl_value = $template->getTplId();
1168 $mail_data['m_subject'] = $template->getSubject();
1169 $mail_data['m_message'] = $this->umail->appendSignature($template->getMessage());
1170 }
1171 }
1172 if (isset($mail_data['template_id'])) {
1173 $tmpl_value = (int) $mail_data['template_id'];
1174 }
1175 asort($options);
1176
1177 $template_chb = $ff
1178 ->select(
1179 $this->lng->txt('mail_template_client'),
1180 $options,
1181 $this->lng->txt('mail_template_client_info')
1182 )
1183 ->withValue($tmpl_value)
1184 ->withOnUpdate($signal);
1185 }
1186 } catch (Exception) {
1187 ilLoggerFactory::getLogger('mail')->error(sprintf(
1188 '%s has been called with invalid context id: %s.',
1189 __METHOD__,
1190 $context_id
1191 ));
1192 }
1193 } else {
1194 $use_placeholder_value = $mail_data['use_placeholders'] ?? false;
1195 }
1196
1197 $m_subject = $ff
1198 ->text($this->lng->txt('subject'))
1199 ->withRequired(
1200 true,
1201 $this->refinery->logical()->sequential([
1202 $this->refinery->logical()->not($this->refinery->null()),
1203 $this->refinery->string()->hasMinLength(1)
1204 ])->withProblemBuilder(function ($txt) {
1205 return $txt('mail_add_subject');
1206 })
1207 )
1208 ->withMaxLength(200)
1209 ->withValue($mail_data['m_subject'] ?? '');
1210
1211 $m_message = $ff->markdown(
1213 $this->lng->txt('message_content')
1214 )->withValue($mail_data['m_message'] ?? '');
1215
1216 $use_placeholders = $ff->hidden()->withValue($use_placeholder_value ? '1' : '0');
1217
1218 $placeholders = [];
1220 if ($mode === self::MAIL_FORM_MODE_SERIAL_LETTER && $context) {
1221 foreach ($context->getPlaceholders() as $value) {
1222 $placeholders[$value['placeholder']] = $value['label'];
1223 }
1224 if (!empty($placeholders)) {
1225 $m_message = $m_message
1226 ->withMustacheVariables(
1227 $placeholders,
1228 $this->lng->txt('mail_nacc_use_placeholder') . '<br />'
1229 . sprintf($this->lng->txt('placeholders_advise'), '<br />')
1230 )
1231 ;
1232 }
1233 }
1234
1235 $use_placeholders = $use_placeholders->withAdditionalTransformation(
1236 $this->refinery->kindlyTo()->bool()
1237 );
1238
1239 if ($signal !== null) {
1240 $m_subject = $m_subject->withAdditionalOnLoadCode(
1241 function ($id) use ($signal) {
1242 return "
1243 $(document).on('{$signal}', function (event, signalData) {
1244 let subject = document.getElementById('{$id}');
1245 let child = subject.querySelector('.c-input__field input');
1246 let triggerer = signalData.triggerer[0];
1247 let tplId = triggerer.querySelector('select').value;
1248 if (tplId != '') {
1249 child.value = decodeURIComponent(signalData.options[tplId + '_subject'].replace(/\+/g, ' '));
1250 }
1251 });
1252 ";
1253 }
1254 );
1255 $m_message = $m_message->withAdditionalOnLoadCode(
1256 function ($id) use ($signal) {
1257 return "
1258 $(document).on('{$signal}', function (event, signalData) {
1259 let message = document.getElementById('{$id}');
1260 let child = message.querySelector('.c-input__field textarea');
1261 let triggerer = signalData.triggerer[0];
1262 let tplId = triggerer.querySelector('select').value;
1263 if (tplId != '') {
1264 child.value = decodeURIComponent(signalData.options[tplId + '_message'].replace(/\+/g, ' '));
1265 }
1266 });
1267 ";
1268 }
1269 );
1270 }
1271
1272 $elements = [
1273 'rcp_to' => $rcp_to,
1274 'rcp_cc' => $rcp_cc,
1275 'rcp_bcc' => $rcp_bcc,
1276 'm_subject' => $m_subject,
1277 'attachments' => $attachments
1278 ];
1279 if ($template_chb !== null) {
1280 $elements[] = $template_chb;
1281 }
1282 $elements['m_message'] = $m_message;
1283
1284 $schedule_date_time_value = null;
1285 $current_time = $this->clock->local(new DateTimeZone($this->user->getTimeZone()))->now();
1286 $schedule_date_time_input = $ff
1287 ->dateTime($this->lng->txt('mail_schedule_scheduled_datetime'))
1288 ->withUseTime(true)
1289 ->withTimezone($this->user->getTimezone())
1291 $this->refinery->custom()->constraint(
1292 function (DateTimeImmutable $v) use ($current_time) {
1293 return $v > $current_time;
1294 },
1295 $this->lng->txt('mail_schedule_error_past_datetime')
1296 )
1297 );
1298
1299 if (isset($mail_data['schedule_datetime'])) {
1300 $schedule_time = new DateTimeImmutable(
1301 (string) $mail_data['schedule_datetime'],
1302 new DateTimeZone($mail_data['schedule_timezone'] ?? '')
1303 );
1304 $schedule_time->setTimezone(new DateTimeZone($this->user->getTimeZone()));
1305 $schedule_date_time_value = $schedule_time > $current_time ? $schedule_time : null;
1306 }
1307
1308 $use_schedule_input = $ff->optionalGroup(
1309 ['m_schedule' => $schedule_date_time_input],
1310 $this->lng->txt('mail_message_scheduled')
1311 )->withAdditionalTransformation(
1312 $this->refinery->custom()->constraint(
1313 function (?array $v) {
1314 return $v === null || (isset($v['m_schedule']) && $v['m_schedule'] instanceof DateTimeImmutable);
1315 },
1316 $this->lng->txt('mail_schedule_error_no_datetime')
1317 )
1318 );
1319 if ($schedule_date_time_value !== null) {
1320 $use_schedule_input = $use_schedule_input->withValue(['m_schedule' => $schedule_date_time_value]);
1321 } else {
1322 $use_schedule_input = $use_schedule_input->withValue(null);
1323 }
1324
1325 $elements['use_schedule'] = $use_schedule_input;
1326 $elements['use_placeholders'] = $use_placeholders;
1327
1328 $section = $ff->section(
1329 $elements,
1330 $this->lng->txt('compose')
1331 );
1332
1333 return [
1334 $section
1335 ];
1336 }
static getLogger(string $a_component_id)
Get component logger.
final const string MAIL_FORM_MODE_SERIAL_LETTER
final const string MAIL_FORM_MODE_REGULAR_MAIL
withAdditionalTransformation(Transformation $trafo)
@inheritDoc
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61

References $id, ILIAS\UI\Implementation\Component\Input\Field\$options, ilMailFormCall\getContextId(), ilLoggerFactory\getLogger(), ilMailTemplateContextService\getTemplateContextById(), getUserSearchConfigurator(), ILIAS\Repository\int(), ILIAS\Mail\Attachments\MailAttachments\isEmpty(), ILIAS\Repository\lng(), MAIL_FORM_MODE_REGULAR_MAIL, MAIL_FORM_MODE_SERIAL_LETTER, ILIAS\Repository\refinery(), ILIAS\Repository\user(), ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), and ILIAS\UI\Implementation\Component\Input\withValue().

+ Here is the call graph for this function:

◆ cancelMail()

ilMailFormGUI::cancelMail ( )

Definition at line 988 of file class.ilMailFormGUI.php.

988 : void
989 {
992 }
993
994 $this->showForm();
995 }
showForm(?Form $form=null)
static redirect(string $a_script)

References ilMailFormCall\getRefererRedirectUrl(), ilMailFormCall\isRefererStored(), ilUtil\redirect(), and showForm().

+ Here is the call graph for this function:

◆ cancelSearch()

ilMailFormGUI::cancelSearch ( )

Definition at line 560 of file class.ilMailFormGUI.php.

560 : void
561 {
562 ilSession::clear('mail_search');
563 $this->searchResults();
564 }
static clear(string $a_var)

References ilSession\clear(), and searchResults().

+ Here is the call graph for this function:

◆ editAttachments()

ilMailFormGUI::editAttachments ( )

Definition at line 566 of file class.ilMailFormGUI.php.

566 : void
567 {
568 $this->saveMailBeforeSearch();
569
570 $this->ctrl->setParameterByClass(ilMailAttachmentGUI::class, 'ref', 'mail');
571 $this->ctrl->redirectByClass(ilMailAttachmentGUI::class);
572 }
saveMailBeforeSearch(?array $input_results=null)

References ILIAS\Repository\ctrl(), and saveMailBeforeSearch().

+ Here is the call graph for this function:

◆ executeCommand()

ilMailFormGUI::executeCommand ( )

Definition at line 164 of file class.ilMailFormGUI.php.

164 : void
165 {
166 $forward_class = $this->ctrl->getNextClass($this) ?? '';
167 switch (strtolower($forward_class)) {
168 case strtolower(ILIAS\User\Search\EndpointGUI::class):
169 $gui = $this->user_search->getEndpointGUI(
171 );
172 $this->ctrl->forwardCommand($gui);
173 break;
174
175 case strtolower(ilMailAttachmentGUI::class):
176 $this->ctrl->setReturn($this, 'returnFromAttachments');
177 $gui = new ilMailAttachmentGUI();
178 $gui->consume();
179 $this->ctrl->forwardCommand($gui);
180 break;
181
182 case strtolower(ilMailSearchGUI::class):
183 $this->ctrl->setReturn($this, 'searchResults');
184 $this->ctrl->forwardCommand(new ilMailSearchGUI());
185 break;
186
187 case strtolower(ilMailSearchCoursesGUI::class):
188 $this->ctrl->setReturn($this, 'searchResults');
189 $this->ctrl->forwardCommand(new ilMailSearchCoursesGUI());
190 break;
191
192 case strtolower(ilMailingListsGUI::class):
193 $this->ctrl->setReturn($this, 'searchResults');
194 $this->ctrl->forwardCommand(new ilMailingListsGUI());
195 break;
196
197 case strtolower(ilMailSearchGroupsGUI::class):
198 $this->ctrl->setReturn($this, 'searchResults');
199 $this->ctrl->forwardCommand(new ilMailSearchGroupsGUI());
200 break;
201
202 case strtolower(ilMailFormUploadHandlerGUI::class):
203 $this->ctrl->forwardCommand($this->upload_handler);
204 break;
205
206 default:
207 if (!($cmd = $this->ctrl->getCmd())) {
208 $cmd = 'showForm';
209 }
210
211 $this->$cmd();
212 break;
213 }
214 }
@phpstan-import-type AutoCompleteUserRecord from RecipientSearchProvider
Definition: Search.php:27
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References ILIAS\Repository\ctrl(), and getUserSearchConfigurator().

+ Here is the call graph for this function:

◆ getBodyParam()

ilMailFormGUI::getBodyParam ( string  $name,
Transformation  $trafo,
  $default = null 
)
private

Definition at line 152 of file class.ilMailFormGUI.php.

153 {
154 if ($this->http->wrapper()->post()->has($name)) {
155 return $this->http->wrapper()->post()->retrieve(
156 $name,
157 $trafo
158 );
159 }
160
161 return $default;
162 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http().

Referenced by lookupRecipientAsync(), and search().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOwnMailOrRedirect()

ilMailFormGUI::getOwnMailOrRedirect ( int  $mail_id)
private
Returns
array<string, mixed>

Definition at line 932 of file class.ilMailFormGUI.php.

932 : array
933 {
934 $mail_data = $this->umail->getMail($mail_id);
935 if ($mail_data === null) {
936 $this->tpl->setOnScreenMessage(
938 $this->lng->txt('permission_denied'),
939 true
940 );
941 $this->ctrl->redirectByClass(ilMailGUI::class);
942 }
943
944 return $mail_data;
945 }

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE.

Referenced by showForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQueryParam()

ilMailFormGUI::getQueryParam ( string  $name,
Transformation  $trafo,
  $default = null 
)
private

Definition at line 140 of file class.ilMailFormGUI.php.

141 {
142 if ($this->http->wrapper()->query()->has($name)) {
143 return $this->http->wrapper()->query()->retrieve(
144 $name,
145 $trafo
146 );
147 }
148
149 return $default;
150 }

References ILIAS\FileDelivery\http().

Referenced by showForm(), and toggleMailMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplateDataById()

ilMailFormGUI::getTemplateDataById ( )
protected

Definition at line 610 of file class.ilMailFormGUI.php.

610 : void
611 {
612 if (!$this->http->wrapper()->query()->has('template_id')) {
613 $this->http->close();
614 }
615
616 try {
617 $template = $this->template_service->loadTemplateForId(
618 $this->http->wrapper()->query()->retrieve('template_id', $this->refinery->kindlyTo()->int())
619 );
621
622 $this->http->saveResponse(
623 $this->http->response()
624 ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
625 ->withBody(Streams::ofString(json_encode([
626 'm_subject' => $template->getSubject(),
627 'm_message' => $this->umail->appendSignature($template->getMessage()),
628 ], JSON_THROW_ON_ERROR)))
629 );
630 } catch (Exception) {
631 }
632
633 $this->http->sendResponse();
634 $this->http->close();
635 }

References ilMailTemplateContextService\getTemplateContextById(), and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

◆ getUserSearchConfigurator()

ilMailFormGUI::getUserSearchConfigurator ( )
private

◆ lookupRecipientAsync()

ilMailFormGUI::lookupRecipientAsync ( )

Definition at line 947 of file class.ilMailFormGUI.php.

947 : void
948 {
949 $search = trim((string) $this->getBodyParam(
950 'term',
951 $this->refinery->kindlyTo()->string(),
952 $this->getQueryParam(
953 'term',
954 $this->refinery->kindlyTo()->string(),
955 ''
956 )
957 ));
958
959 $result = [];
960
961 if (ilStr::strLen($search) < 3) {
962 $this->http->saveResponse(
963 $this->http->response()
964 ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
965 ->withBody(Streams::ofString(json_encode($result, JSON_THROW_ON_ERROR)))
966 );
967
968 $this->http->sendResponse();
969 $this->http->close();
970 }
971
972 // #14768
973 $quoted = ilUtil::stripSlashes($search);
974 $quoted = str_replace(['%', '_'], ['\%', '\_'], $quoted);
975
976 $form = new ilMailForm();
977 $result = $form->getRecipientAsync('%' . $quoted . '%', ilUtil::stripSlashes($search));
978
979 $this->http->saveResponse(
980 $this->http->response()
981 ->withHeader(ResponseHeader::CONTENT_TYPE, 'application/json')
982 ->withBody(Streams::ofString(json_encode($result, JSON_THROW_ON_ERROR)))
983 );
984 $this->http->sendResponse();
985 $this->http->close();
986 }
getBodyParam(string $name, Transformation $trafo, $default=null)
static strLen(string $a_string)
Definition: class.ilStr.php:60
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References getBodyParam(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), ilUtil\stripSlashes(), and ilStr\strLen().

+ Here is the call graph for this function:

◆ mailAttachment()

ilMailFormGUI::mailAttachment ( )

Definition at line 604 of file class.ilMailFormGUI.php.

604 : void
605 {
606 $this->mail_form_type = self::MAIL_FORM_TYPE_ATTACH;
607 $this->showForm();
608 }
final const string MAIL_FORM_TYPE_ATTACH

References MAIL_FORM_TYPE_ATTACH, and showForm().

+ Here is the call graph for this function:

◆ mailFormToolbarDelegatedSubmitJs()

ilMailFormGUI::mailFormToolbarDelegatedSubmitJs ( string  $toolbar_button_id,
string  $form_action 
)
private

Definition at line 1444 of file class.ilMailFormGUI.php.

1444 : string
1445 {
1446 return "document.getElementById('{$toolbar_button_id}').addEventListener('click', function () {
1447 let mailform = document.querySelector('form.c-form');
1448 if (!mailform) {
1449 return;
1450 }
1451 let submitBtn = mailform.querySelector('button[type=\"submit\"]');
1452 if (submitBtn) {
1453 submitBtn.formAction = '$form_action';
1454 mailform.requestSubmit(submitBtn);
1455 } else {
1456 mailform.action = '$form_action';
1457 mailform.submit();
1458 }
1459 });";
1460 }

Referenced by addToolbarButtons().

+ Here is the caller graph for this function:

◆ mailRole()

ilMailFormGUI::mailRole ( )

Definition at line 592 of file class.ilMailFormGUI.php.

592 : void
593 {
594 $this->mail_form_type = self::MAIL_FORM_TYPE_ROLE;
595 $this->showForm();
596 }
final const string MAIL_FORM_TYPE_ROLE

References MAIL_FORM_TYPE_ROLE, and showForm().

+ Here is the call graph for this function:

◆ mailUser()

ilMailFormGUI::mailUser ( )

Definition at line 586 of file class.ilMailFormGUI.php.

586 : void
587 {
588 $this->mail_form_type = self::MAIL_FORM_TYPE_NEW;
589 $this->showForm();
590 }
final const string MAIL_FORM_TYPE_NEW

References MAIL_FORM_TYPE_NEW, and showForm().

+ Here is the call graph for this function:

◆ replyMail()

ilMailFormGUI::replyMail ( )

Definition at line 598 of file class.ilMailFormGUI.php.

598 : void
599 {
600 $this->mail_form_type = self::MAIL_FORM_TYPE_REPLY;
601 $this->showForm();
602 }
final const string MAIL_FORM_TYPE_REPLY

References MAIL_FORM_TYPE_REPLY, and showForm().

+ Here is the call graph for this function:

◆ resetStage()

ilMailFormGUI::resetStage ( )
private

Definition at line 484 of file class.ilMailFormGUI.php.

484 : void
485 {
486 $this->umail->persistToStage($this->user->getId(), '', '', '', '', '', null);
487 }

References ILIAS\Repository\user().

Referenced by saveDraft(), and saveMessageToOutbox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnFromAttachments()

ilMailFormGUI::returnFromAttachments ( )

Definition at line 574 of file class.ilMailFormGUI.php.

574 : void
575 {
576 $this->mail_form_type = self::MAIL_FORM_TYPE_ATTACH;
577 $this->showForm();
578 }

References MAIL_FORM_TYPE_ATTACH, and showForm().

+ Here is the call graph for this function:

◆ saveDraft()

ilMailFormGUI::saveDraft ( )

Definition at line 405 of file class.ilMailFormGUI.php.

405 : void
406 {
407 $form = $this->buildForm()->withRequest($this->request);
408 $result = $form->getInputGroup()->getContent();
409
410 if (!$result->isOK()) {
411 $this->showForm($form);
412 return;
413 }
414
415 $value = $result->value()[0];
416
417 if ($value['m_subject'] === '') {
418 $value['m_subject'] = $this->lng->txt('mail_no_subject');
419 }
420 try {
421 $attachments = $this->attachmentsFromFormUpload($value['attachments']);
423 $this->tpl->setOnScreenMessage(ilGlobalTemplateInterface::MESSAGE_TYPE_FAILURE, $e->getMessage());
424 $this->showForm($form);
425 return;
426 }
427
428 $draft_folder_id = $this->mbox->getDraftsFolder();
429
430 $rcp_to = !empty($value['rcp_to']) ? implode(',', $value['rcp_to']) : '';
431 $rcp_cc = !empty($value['rcp_cc']) ? implode(',', $value['rcp_cc']) : '';
432 $rcp_bcc = !empty($value['rcp_bcc']) ? implode(',', $value['rcp_bcc']) : '';
433
434 if ($errors = $this->umail->validateRecipients($rcp_to, $rcp_cc, $rcp_bcc)) {
435 $this->umail->saveAttachments($attachments);
436 $this->request_attachments = $attachments;
437 $this->showSubmissionErrors($errors);
438 $this->showForm($form);
439 return;
440 }
441
442 if (ilSession::get('draft')) {
443 $draft_id = (int) ilSession::get('draft');
444 ilSession::clear('draft');
445 } else {
446 $draft_id = $this->umail->getNewDraftId($draft_folder_id);
447 }
448
449 $this->umail->updateDraft(
450 $draft_folder_id,
451 $attachments,
452 $rcp_to,
453 $rcp_cc,
454 $rcp_bcc,
455 ilUtil::securePlainString($value['m_subject']),
456 $value['m_message'],
457 $draft_id,
458 $value['use_schedule']['m_schedule'] ?? null,
459 $value['use_placeholders'],
462 );
463
464 if (ilSession::get('outbox')) {
465 $outbox_id = (int) ilSession::get('outbox');
466 ilSession::clear('outbox');
467 $this->umail->deleteMails([$outbox_id]);
468 }
469
470 $this->resetStage();
471
472 $this->ctrl->setParameterByClass(ilMailFolderGUI::class, 'mobj_id', $draft_folder_id);
473 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_saved'), true);
474
477 } else {
478 $this->ctrl->redirectByClass([ilMailGUI::class, ilMailFolderGUI::class]);
479 }
480
481 $this->showForm();
482 }
buildForm(?array $mail_data=null)
showSubmissionErrors(array $errors)
static get(string $a_var)
static securePlainString(string $a_str)

References Vendor\Package\$e, buildForm(), ilSession\clear(), ILIAS\Repository\ctrl(), ilSession\get(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailFormCall\getRefererRedirectUrl(), ILIAS\Repository\int(), ilMailFormCall\isRefererStored(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, ilUtil\redirect(), resetStage(), ilUtil\securePlainString(), showForm(), and showSubmissionErrors().

+ Here is the call graph for this function:

◆ saveMailBeforeSearch()

ilMailFormGUI::saveMailBeforeSearch ( ?array  $input_results = null)
private
Parameters
array<string|

ILIAS\UI\Component\Input\Input>|null $input_results

Definition at line 1000 of file class.ilMailFormGUI.php.

1000 : void
1001 {
1002 if (empty($input_results)) {
1003 $form = $this->buildForm()->withRequest($this->request);
1004 $result = $form->getInputGroup()->getInputs()[0]->getInputs();
1005 } else {
1006 $result = $input_results;
1007 }
1008
1009 $stage_attachments = null;
1010 if (!empty($result['attachments']->getValue())) {
1011 $stage_attachments = $this->tryHandleAttachments($result['attachments']->getValue());
1012 if ($stage_attachments === null) {
1013 return;
1014 }
1015 }
1016
1017 $rcp_to = implode(',', $result['rcp_to']->getValue() ?? []);
1018 $rcp_cc = implode(',', $result['rcp_cc']->getValue() ?? []);
1019 $rcp_bcc = implode(',', $result['rcp_bcc']->getValue() ?? []);
1020
1021 $this->umail->persistToStage(
1022 $this->user->getId(),
1023 $rcp_to,
1024 $rcp_cc,
1025 $rcp_bcc,
1026 ilUtil::securePlainString($result['m_subject']->getValue()),
1027 ilUtil::securePlainString($result['m_message']->getValue()),
1028 $stage_attachments,
1029 (bool) $result['use_placeholders']->getValue(),
1032 );
1033 }
tryHandleAttachments(array $attachments, ?Form $form=null)

References buildForm(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ILIAS\UI\Implementation\Component\Input\getValue(), ilUtil\securePlainString(), tryHandleAttachments(), and ILIAS\Repository\user().

Referenced by editAttachments(), searchCoursesTo(), searchGroupsTo(), searchMailingListsTo(), searchUsers(), and toggleMailMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveMessageToOutbox()

ilMailFormGUI::saveMessageToOutbox ( array  $form_values,
Form  $form 
)

Definition at line 217 of file class.ilMailFormGUI.php.

217 : void
218 {
219 try {
220 $attachments = $this->attachmentsFromFormUpload($form_values['attachments']);
222 $this->tpl->setOnScreenMessage(ilGlobalTemplateInterface::MESSAGE_TYPE_FAILURE, $e->getMessage());
223 $this->showForm($form);
224 return;
225 }
226
227 $rcp_to = '';
228 $rcp_cc = '';
229 $rcp_bcc = '';
230 if ($form_values['rcp_to'] !== []) {
231 $rcp_to = $form_values['rcp_to'][0];
232 }
233 if ($form_values['rcp_cc'] !== []) {
234 $rcp_cc = $form_values['rcp_cc'][0];
235 }
236 if ($form_values['rcp_bcc'] !== []) {
237 $rcp_bcc = $form_values['rcp_bcc'][0];
238 }
239
240 $errors = $this->umail->validateRecipients(
241 $rcp_to,
242 $rcp_cc,
243 $rcp_bcc,
244 );
245 if ($errors) {
246 $this->umail->saveAttachments($attachments);
247 $this->showSubmissionErrors($errors);
248 $this->showForm();
249 $this->http->close();
250 }
251
252 $sanitized_message = (new ilMailBody($form_values['m_message'], $this->purifier))->getContent();
253
254 $outbox_folder_id = $this->mbox->getOutboxFolder();
255 if (ilSession::get('outbox')) {
256 $outbox_id = (int) ilSession::get('outbox');
257 ilSession::clear('outbox');
258 }
259
260 $this->umail->scheduledMail(
261 $outbox_folder_id,
262 $this->user->getId(),
265 $rcp_to,
266 $rcp_cc,
267 $rcp_bcc,
268 ilUtil::securePlainString($form_values['m_subject'] ?? $this->lng->txt('mail_no_subject')),
269 $sanitized_message,
270 $attachments,
271 $form_values['use_placeholders'],
272 $outbox_id ?? null
273 ),
274 $form_values['use_schedule']['m_schedule']
275 ),
278 );
279
280 if (ilSession::get('draft')) {
281 $draft_id = (int) ilSession::get('draft');
282 ilSession::clear('draft');
283 $this->umail->deleteMails([$draft_id]);
284 }
285
286 // The scheduled mail now owns its attachments, a new mail must not inherit them
287 $this->resetStage();
288
289 $this->ctrl->setParameterByClass(ilMailFolderGUI::class, 'mobj_id', $outbox_folder_id);
290 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_scheduled'), true);
291
294 } else {
295 $this->ctrl->redirectByClass([ilMailGUI::class, ilMailFolderGUI::class]);
296 }
297
298 $this->showForm();
299 }

References Vendor\Package\$e, ilSession\clear(), ILIAS\Repository\ctrl(), ilSession\get(), ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailFormCall\getRefererRedirectUrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\int(), ilMailFormCall\isRefererStored(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, ilUtil\redirect(), resetStage(), ilUtil\securePlainString(), showForm(), showSubmissionErrors(), and ILIAS\Repository\user().

Referenced by sendMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ search()

ilMailFormGUI::search ( )

Definition at line 536 of file class.ilMailFormGUI.php.

536 : void
537 {
539 'mail_search_search',
540 ilUtil::securePlainString($this->getBodyParam('search', $this->refinery->kindlyTo()->string(), ''))
541 );
542
543 if (trim(ilSession::get('mail_search_search') ?? '') === '') {
544 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_insert_query'));
545 $this->searchUsers(false);
546 } elseif (strlen(trim(ilSession::get('mail_search_search') ?? '')) < 3) {
547 $this->lng->loadLanguageModule('search');
548 $this->tpl->setOnScreenMessage('info', $this->lng->txt('search_minimum_three'));
549 $this->searchUsers(false);
550 } else {
551 $this->ctrl->setParameterByClass(
552 ilMailSearchGUI::class,
553 'search',
554 urlencode(ilSession::get('mail_search_search') ?? '')
555 );
556 $this->ctrl->redirectByClass(ilMailSearchGUI::class);
557 }
558 }
searchUsers(bool $save=true)
static set(string $a_var, $a_val)
Set a value.

References ILIAS\Repository\ctrl(), ilSession\get(), getBodyParam(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), searchUsers(), ilUtil\securePlainString(), and ilSession\set().

+ Here is the call graph for this function:

◆ searchCoursesTo()

ilMailFormGUI::searchCoursesTo ( )

Definition at line 520 of file class.ilMailFormGUI.php.

520 : void
521 {
522 $this->saveMailBeforeSearch();
523
524 $this->ctrl->setParameterByClass(ilMailSearchCoursesGUI::class, 'ref', 'mail');
525 $this->ctrl->redirectByClass(ilMailSearchCoursesGUI::class);
526 }

References ILIAS\Repository\ctrl(), and saveMailBeforeSearch().

+ Here is the call graph for this function:

◆ searchGroupsTo()

ilMailFormGUI::searchGroupsTo ( )

Definition at line 528 of file class.ilMailFormGUI.php.

528 : void
529 {
530 $this->saveMailBeforeSearch();
531
532 $this->ctrl->setParameterByClass(ilMailSearchGroupsGUI::class, 'ref', 'mail');
533 $this->ctrl->redirectByClass(ilMailSearchGroupsGUI::class);
534 }

References ILIAS\Repository\ctrl(), and saveMailBeforeSearch().

+ Here is the call graph for this function:

◆ searchMailingListsTo()

ilMailFormGUI::searchMailingListsTo ( )

Definition at line 1035 of file class.ilMailFormGUI.php.

1035 : void
1036 {
1037 $this->saveMailBeforeSearch();
1038
1039 $this->ctrl->setParameterByClass(ilMailingListsGUI::class, 'ref', 'mail');
1040 $this->ctrl->redirectByClass(ilMailingListsGUI::class);
1041 }

References ILIAS\Repository\ctrl(), and saveMailBeforeSearch().

+ Here is the call graph for this function:

◆ searchResults()

ilMailFormGUI::searchResults ( )

Definition at line 580 of file class.ilMailFormGUI.php.

580 : void
581 {
582 $this->mail_form_type = self::MAIL_FORM_TYPE_SEARCH_RESULT;
583 $this->showForm();
584 }
final const string MAIL_FORM_TYPE_SEARCH_RESULT

References MAIL_FORM_TYPE_SEARCH_RESULT, and showForm().

Referenced by cancelSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchUsers()

ilMailFormGUI::searchUsers ( bool  $save = true)

Definition at line 489 of file class.ilMailFormGUI.php.

489 : void
490 {
491 $this->tpl->setTitle($this->lng->txt('mail_new'));
492
493 if ($save) {
494 $this->saveMailBeforeSearch();
495 }
496
497 $form = new ilPropertyFormGUI();
498 $form->setId('search_rcp');
499 $form->setTitle($this->lng->txt('search_recipients'));
500 $form->setFormAction($this->ctrl->getFormAction($this, 'search'));
501
502 $inp = new ilTextInputGUI($this->lng->txt('search_for'), 'search');
503 $inp->setSize(30);
504 $data_source_url = $this->ctrl->getLinkTarget($this, 'lookupRecipientAsync', '', true);
505 $inp->setDataSource($data_source_url);
506
507 $search_query = trim((string) ilSession::get('mail_search_search'));
508 if ($search_query !== '') {
509 $inp->setValue(ilLegacyFormElementsUtil::prepareFormOutput($search_query, true));
510 }
511 $form->addItem($inp);
512
513 $form->addCommandButton('search', $this->lng->txt('search'));
514 $form->addCommandButton('cancelSearch', $this->lng->txt('cancel'));
515
516 $this->tpl->setContent($form->getHTML());
517 $this->tpl->printToStdout();
518 }
static prepareFormOutput($a_str, bool $a_strip=false)
This class represents a property form user interface.
This class represents a text property in a property form.

References ILIAS\Repository\ctrl(), ilSession\get(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and saveMailBeforeSearch().

Referenced by search().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendMessage()

ilMailFormGUI::sendMessage ( )

Definition at line 301 of file class.ilMailFormGUI.php.

301 : void
302 {
303 $form = $this->buildForm()->withRequest($this->request);
304 $result = $form->getInputGroup()->getContent();
305
306 if (!$result->isOK()) {
307 $this->showForm($form);
308 return;
309 }
310
311 $value = $result->value()[0];
312
313 $schedule_date = $value['use_schedule']['m_schedule'] ?? null;
314 if ($schedule_date instanceof DateTimeImmutable &&
315 $schedule_date > $this->clock->local(new DateTimeZone($this->user->getTimeZone()))->now()) {
316 $this->saveMessageToOutbox($value, $form);
317 return;
318 }
319
320 try {
321 $attachments = $this->attachmentsFromFormUpload($value['attachments']);
323 $this->tpl->setOnScreenMessage(ilGlobalTemplateInterface::MESSAGE_TYPE_FAILURE, $e->getMessage());
324 $this->showForm($form);
325 return;
326 }
327
328 $mailer = $this->umail
329 ->withContextId(ilMailFormCall::getContextId() ?: '')
330 ->withContextParameters(ilMailFormCall::getContextParameters());
331
332 $mailer->setSaveInSentbox(true);
333
334 $mailer->autoresponder()->enableAutoresponder();
335
336 $rcp_to = '';
337 $rcp_cc = '';
338 $rcp_bcc = '';
339 if (!empty($value['rcp_to'])) {
340 $rcp_to = implode(',', $value['rcp_to']);
341 }
342 if (!empty($value['rcp_cc'])) {
343 $rcp_cc = implode(',', $value['rcp_cc']);
344 }
345 if (!empty($value['rcp_bcc'])) {
346 $rcp_bcc = implode(',', $value['rcp_bcc']);
347 }
348
349 if ($errors = $mailer->enqueue(
350 $rcp_to,
351 $rcp_cc,
352 $rcp_bcc,
353 ilUtil::securePlainString($value['m_subject']),
354 (new ilMailBody($value['m_message'], $this->purifier))->getContent(),
355 $attachments,
356 $value['use_placeholders']
357 )) {
358 $mailer->autoresponder()->disableAutoresponder();
359
360 $this->umail->saveAttachments($attachments);
361 $this->showSubmissionErrors($errors);
362 $this->showForm($form);
363
364 $this->http->close();
365 } else {
366 $mailer->autoresponder()->disableAutoresponder();
367
368 $mailer->persistToStage(
369 $this->user->getId(),
370 '',
371 '',
372 '',
373 '',
374 '',
375 null
376 );
377
378 $mail_id = null;
379 if (ilSession::get('outbox')) {
380 $mail_id = (int) ilSession::get('outbox');
381 ilSession::clear('outbox');
382 } elseif (ilSession::get('draft')) {
383 $mail_id = (int) ilSession::get('draft');
384 ilSession::clear('draft');
385 }
386
387 if ($mail_id) {
388 $mailer->deleteMails([$mail_id]);
389 }
390
391 $this->ctrl->setParameterByClass(ilMailGUI::class, 'type', 'message_sent');
392
394 $this->tpl->setOnScreenMessage('success', $this->lng->txt('mail_message_send'), true);
395 $this->ctrl->redirectToURL(ilMailFormCall::getRefererRedirectUrl());
396 } else {
397 $this->ctrl->redirectByClass(ilMailGUI::class);
398 }
399 }
400 $mailer->autoresponder()->disableAutoresponder();
401
402 $this->showForm();
403 }
saveMessageToOutbox(array $form_values, Form $form)

References Vendor\Package\$e, buildForm(), ilSession\clear(), ILIAS\Repository\ctrl(), ilSession\get(), ILIAS\UI\Implementation\Component\Input\ViewControl\getContent(), ilMailFormCall\getContextId(), ilMailFormCall\getContextParameters(), ilMailFormCall\getRefererRedirectUrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\int(), ilMailFormCall\isRefererStored(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, saveMessageToOutbox(), ilUtil\securePlainString(), showForm(), showSubmissionErrors(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ showForm()

ilMailFormGUI::showForm ( ?Form  $form = null)

Definition at line 637 of file class.ilMailFormGUI.php.

637 : void
638 {
639 $this->tpl->addBlockFile(
640 'ADM_CONTENT',
641 'adm_content',
642 'tpl.mail_new.html',
643 'components/ILIAS/Mail'
644 );
645 $this->tpl->setTitle($this->lng->txt('mail_new'));
646
647 $this->lng->loadLanguageModule('crs');
648
650 $this->tabs->setBackTarget(
651 $this->lng->txt('back'),
652 $this->ctrl->getLinkTarget($this, 'cancelMail')
653 );
654 }
655
656 $mail_data = [];
657 $mail_data['rcp_to'] = '';
658 $mail_data['rcp_cc'] = '';
659 $mail_data['rcp_bcc'] = '';
660 $mail_data['attachments'] = [];
661 $mail_data['m_subject'] = '';
662 $mail_data['m_message'] = '';
663
664 $mail_id = $this->getQueryParam('mail_id', $this->refinery->kindlyTo()->int(), 0);
665 $type = $this->getQueryParam('type', $this->refinery->kindlyTo()->string(), '');
666 if ($this->mail_form_type !== '') {
667 $type = $this->mail_form_type;
668 }
669
670 switch ($type) {
672 $mail_data = $this->umail->getMail($mail_id);
673
674 $mail_data['m_subject'] = $this->umail->formatReplySubject($mail_data['m_subject'] ?? '');
675 $mail_data['m_message'] = $this->umail->prependSignature(
676 $this->umail->formatReplyMessage($mail_data['m_message'] ?? '')
677 );
678 $mail_data['attachments'] = [];
679 $mail_data['rcp_cc'] = '';
680 $mail_data['rcp_to'] = $this->umail->formatReplyRecipient();
681 break;
682
684 $mail_data = $this->umail->retrieveFromStage();
685 if (ilSession::get('mail_search_results_to')) {
686 $mail_data = $this->umail->appendSearchResult(
687 $this->refinery->kindlyTo()->listOf(
688 $this->refinery->kindlyTo()->string()
689 )->transform(ilSession::get('mail_search_results_to')),
690 'to'
691 );
692 }
693 if (ilSession::get('mail_search_results_cc')) {
694 $mail_data = $this->umail->appendSearchResult(
695 $this->refinery->kindlyTo()->listOf(
696 $this->refinery->kindlyTo()->string()
697 )->transform(ilSession::get('mail_search_results_cc')),
698 'cc'
699 );
700 }
701 if (ilSession::get('mail_search_results_bcc')) {
702 $mail_data = $this->umail->appendSearchResult(
703 $this->refinery->kindlyTo()->listOf(
704 $this->refinery->kindlyTo()->string()
705 )->transform(ilSession::get('mail_search_results_bcc')),
706 'bc'
707 );
708 }
709
710 ilSession::clear('mail_search_results_to');
711 ilSession::clear('mail_search_results_cc');
712 ilSession::clear('mail_search_results_bcc');
713 break;
714
716 $mail_data = $this->getOwnMailOrRedirect($mail_id);
717 ilSession::set('draft', $mail_id);
718
719 if ($mail_data['attachments'] instanceof MailAttachments && !$mail_data['attachments']->isEmpty()) {
720 $stage_attachments = $this->stageAttachmentsFromMailAttachments($mail_data['attachments']);
721 $this->umail->persistToStage(
722 $this->user->getId(),
723 (string) ($mail_data['rcp_to'] ?? ''),
724 (string) ($mail_data['rcp_cc'] ?? ''),
725 (string) ($mail_data['rcp_bcc'] ?? ''),
726 (string) ($mail_data['m_subject'] ?? ''),
727 (string) ($mail_data['m_message'] ?? ''),
728 $stage_attachments,
729 (bool) ($mail_data['use_placeholders'] ?? false),
730 $mail_data['tpl_ctx_id'] ?? null,
731 (array) ($mail_data['tpl_ctx_params'] ?? [])
732 );
733 $mail_data['attachments'] = $this->formRidsFromMailAttachments($stage_attachments);
734 } else {
735 $mail_data['attachments'] = [];
736 }
737
738 ilMailFormCall::setContextId($mail_data['tpl_ctx_id']);
739 ilMailFormCall::setContextParameters($mail_data['tpl_ctx_params']);
740 break;
741
743 $mail_data = $this->getOwnMailOrRedirect($mail_id);
744 ilSession::set('outbox', $mail_id);
745
746 if ($mail_data['attachments'] instanceof MailAttachments && !$mail_data['attachments']->isEmpty()) {
747 $stage_attachments = $this->stageAttachmentsFromMailAttachments($mail_data['attachments']);
748 $this->umail->persistToStage(
749 $this->user->getId(),
750 (string) ($mail_data['rcp_to'] ?? ''),
751 (string) ($mail_data['rcp_cc'] ?? ''),
752 (string) ($mail_data['rcp_bcc'] ?? ''),
753 (string) ($mail_data['m_subject'] ?? ''),
754 (string) ($mail_data['m_message'] ?? ''),
755 $stage_attachments,
756 (bool) ($mail_data['use_placeholders'] ?? false),
757 $mail_data['tpl_ctx_id'] ?? null,
758 (array) ($mail_data['tpl_ctx_params'] ?? [])
759 );
760 $mail_data['attachments'] = $this->formRidsFromMailAttachments($stage_attachments);
761 } else {
762 $mail_data['attachments'] = [];
763 }
764
765 ilMailFormCall::setContextId($mail_data['tpl_ctx_id']);
766 ilMailFormCall::setContextParameters($mail_data['tpl_ctx_params']);
767 break;
768
770 $mail_data = $this->umail->getMail($mail_id);
771 $mail_data['rcp_to'] = $mail_data['rcp_cc'] = $mail_data['rcp_bcc'] = '';
772 $mail_data['m_subject'] = $this->umail->formatForwardSubject($mail_data['m_subject'] ?? '');
773 $mail_data['m_message'] = $this->umail->prependSignature($mail_data['m_message'] ?? '');
774 if ($mail_data['attachments'] instanceof MailAttachments && !$mail_data['attachments']->isEmpty()) {
775 $stage_attachments = $mail_data['attachments']->isLegacy()
776 ? $this->fdm->createStageFromLegacyMailAttachments(
777 (int) $mail_id,
778 $mail_data['attachments']->legacyFilenames()
779 )
780 : $this->stageAttachmentsFromMailAttachments($mail_data['attachments']);
781 $this->umail->persistToStage(
782 $this->user->getId(),
783 '',
784 '',
785 '',
786 $mail_data['m_subject'] ?? '',
787 $mail_data['m_message'] ?? '',
788 $stage_attachments,
789 false
790 );
791 $mail_data['attachments'] = $this->formRidsFromMailAttachments($stage_attachments);
792 } else {
793 $mail_data['attachments'] = [];
794 }
795 break;
796
798 ilSession::clear('draft');
799 ilSession::clear('outbox');
800 // Note: For security reasons, ILIAS only allows Plain text strings in E-Mails.
801 $to = ilUtil::securePlainString($this->getQueryParam('rcp_to', $this->refinery->kindlyTo()->string(), ''));
802 if ($to === '' && ilSession::get('rcp_to')) {
803 $to = ilSession::get('rcp_to');
804 }
805 $mail_data['rcp_to'] = $to;
806
807 $cc = ilUtil::securePlainString($this->getQueryParam('rcp_cc', $this->refinery->kindlyTo()->string(), ''));
808 if ($cc === '' && ilSession::get('rcp_cc')) {
809 $cc = ilSession::get('rcp_cc');
810 }
811 $mail_data['rcp_cc'] = $cc;
812
813 $bcc = ilUtil::securePlainString($this->getQueryParam('rcp_bcc', $this->refinery->kindlyTo()->string(), ''));
814 if ($bcc === '' && ilSession::get('rcp_bcc')) {
815 $bcc = ilSession::get('rcp_bcc');
816 }
817 $mail_data['rcp_bcc'] = $bcc;
818
819 $mail_data['m_message'] = '';
820 if (($sig = ilMailFormCall::getSignature()) !== '') {
821 $mail_data['m_message'] = $sig;
822 $mail_data['m_message'] .= chr(13)
823 . chr(10)
824 . chr(13)
825 . chr(10);
826 }
827 $mail_data['m_message'] .= $this->umail->appendSignature('');
828
829 ilSession::set('rcp_to', '');
830 ilSession::set('rcp_cc', '');
831 ilSession::set('rcp_bcc', '');
832 break;
833
835 $roles = [];
836 if ($this->http->wrapper()->post()->has('roles')) {
837 $roles = $this->http->wrapper()->post()->retrieve(
838 'roles',
839 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
840 );
841 } elseif (is_array(ilSession::get('mail_roles'))) {
842 $roles = $this->refinery->kindlyTo()->listOf(
843 $this->refinery->kindlyTo()->string()
844 )->transform(ilSession::get('mail_roles'));
845 }
846
847 // Note: For security reasons, ILIAS only allows Plain text strings in E-Mails.
848 $mail_data['rcp_to'] = ilUtil::securePlainString(
849 implode(',', $roles)
850 );
851
852 $mail_data['m_message'] = '';
853 if (($sig = ilMailFormCall::getSignature()) !== '') {
854 $mail_data['m_message'] = $sig;
855 $mail_data['m_message'] .= chr(13)
856 . chr(10)
857 . chr(13)
858 . chr(10);
859 }
860
861 $additional_msg_text = '';
862 if ($this->http->wrapper()->post()->has('additional_message_text')) {
863 $additional_msg_text = ilUtil::securePlainString($this->http->wrapper()->post()->retrieve(
864 'additional_message_text',
865 $this->refinery->kindlyTo()->string()
866 ));
867 }
868
869 $mail_data['m_message'] .= $additional_msg_text
870 . chr(13)
871 . chr(10)
872 . $this->umail->appendSignature('');
873 ilSession::set('mail_roles', []);
874 break;
875
877 $rcp = '';
878 if ($this->http->wrapper()->query()->has('rcp')) {
879 $rcp = $this->http->wrapper()->query()->retrieve('rcp', $this->refinery->kindlyTo()->string());
880 }
881 $mail_data['rcp_to'] = urldecode((string) $rcp);
882 break;
884 $mail_data = $this->umail->retrieveFromStage();
885 break;
886 default:
887 $mail_data = $this->http->request()->getParsedBody();
888 foreach ($mail_data as $key => $value) {
889 if (is_string($value)) {
890 // Note: For security reasons, ILIAS only allows Plain text strings in E-Mails.
891 $mail_data[$key] = ilUtil::securePlainString($value);
892 }
893 }
894
895 if ($this->request_attachments instanceof MailAttachments && $this->request_attachments->isIrss()) {
896 $mail_data['attachments'] = $this->FilesFromIRSSToLegacy($this->request_attachments->rcid());
897 }
898 break;
899 }
900
901 if (
902 $type === self::MAIL_FORM_TYPE_DRAFT
903 && !empty($mail_data['schedule_datetime'])
904 && !(
905 $this->http->wrapper()->query()->has(self::PARAM_SCHEDULED_EDIT_FROM_OUTBOX)
906 && $this->http->wrapper()->query()->retrieve(
907 self::PARAM_SCHEDULED_EDIT_FROM_OUTBOX,
908 $this->refinery->kindlyTo()->int()
909 ) === 1
910 )
911 ) {
912 $this->tpl->setOnScreenMessage(
914 $this->lng->txt('mail_scheduled_edit_compose_info'),
915 true
916 );
917 }
918
919 $this->tpl->parseCurrentBlock();
920
921 $form ??= $this->buildForm($mail_data);
922 $this->addToolbarButtons($form);
923
924 $this->tpl->setVariable('FORM', $this->ui_renderer->render($form));
925 $this->tpl->addJavaScript('assets/js/ilMailComposeFunctions.js');
926 $this->tpl->printToStdout();
927 }
static setContextId(?string $id)
static setContextParameters(array $parameters)
final const string MAIL_FORM_TYPE_DRAFT
final const string MAIL_FORM_TYPE_ADDRESS
final const string MAIL_FORM_TYPE_FORWARD
getQueryParam(string $name, Transformation $trafo, $default=null)
final const string MAIL_FORM_TYPE_OUTBOX
addToolbarButtons(Form $form)
getOwnMailOrRedirect(int $mail_id)

References $mail_form_type, addToolbarButtons(), buildForm(), ilSession\clear(), ilSession\get(), getOwnMailOrRedirect(), getQueryParam(), ilMailFormCall\getSignature(), ILIAS\FileDelivery\http(), ILIAS\Mail\Attachments\MailAttachments\isIrss(), ilMailFormCall\isRefererStored(), ILIAS\Repository\lng(), MAIL_FORM_TYPE_ADDRESS, MAIL_FORM_TYPE_ATTACH, MAIL_FORM_TYPE_DRAFT, MAIL_FORM_TYPE_FORWARD, MAIL_FORM_TYPE_NEW, MAIL_FORM_TYPE_OUTBOX, MAIL_FORM_TYPE_REPLY, MAIL_FORM_TYPE_ROLE, MAIL_FORM_TYPE_SEARCH_RESULT, ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_INFO, ILIAS\Repository\refinery(), ilUtil\securePlainString(), ilSession\set(), ilMailFormCall\setContextId(), ilMailFormCall\setContextParameters(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

Referenced by cancelMail(), mailAttachment(), mailRole(), mailUser(), replyMail(), returnFromAttachments(), saveDraft(), saveMessageToOutbox(), searchResults(), sendMessage(), and tryHandleAttachments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSubmissionErrors()

ilMailFormGUI::showSubmissionErrors ( array  $errors)
protected
Parameters
list<ilMailError>$errors

Definition at line 1060 of file class.ilMailFormGUI.php.

1060 : void
1061 {
1062 $formatter = new ilMailErrorFormatter($this->lng);
1063 $formatted_errors = $formatter->format($errors);
1064
1065 if ($formatted_errors !== '') {
1066 $this->tpl->setOnScreenMessage('failure', $formatted_errors);
1067 }
1068 }

References ILIAS\Repository\lng().

Referenced by saveDraft(), saveMessageToOutbox(), and sendMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleMailMode()

ilMailFormGUI::toggleMailMode ( )
private

Definition at line 1462 of file class.ilMailFormGUI.php.

1462 : never
1463 {
1464 $form = $this->buildForm()->withRequest($this->request);
1465
1466 $mode = $this->getQueryParam(
1467 'mail_form_mail_mode',
1468 $this->refinery->kindlyTo()->string(),
1469 self::MAIL_FORM_MODE_REGULAR_MAIL
1470 );
1471
1472 $result = null;
1473 if (!ilMailFormCall::getContextId() && in_array(
1474 $mode,
1475 [self::MAIL_FORM_MODE_REGULAR_MAIL, self::MAIL_FORM_MODE_SERIAL_LETTER],
1476 true
1477 )) {
1478 $result = $form->getInputGroup()->getInputs()[0]->getInputs();
1479 $result['use_placeholders'] = $result['use_placeholders']->withValue(
1480 $mode === self::MAIL_FORM_MODE_SERIAL_LETTER ? '1' : '0'
1481 );
1482 } elseif ($mode === self::MAIL_FORM_MODE_REGULAR_MAIL && ilMailFormCall::getContextId()) {
1483 $this->tpl->setOnScreenMessage(
1484 $this->tpl::MESSAGE_TYPE_INFO,
1485 sprintf(
1486 $this->lng->txt('mail_mode_switch_locked'),
1487 $this->lng->txt('regular_mail')
1488 ),
1489 true
1490 );
1491 }
1492
1493 $this->saveMailBeforeSearch($result ?? null);
1494
1495 $this->ctrl->redirect($this, 'searchResults');
1496 }

References buildForm(), ILIAS\Repository\ctrl(), ilMailFormCall\getContextId(), getQueryParam(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and saveMailBeforeSearch().

+ Here is the call graph for this function:

◆ tryHandleAttachments()

ilMailFormGUI::tryHandleAttachments ( array  $attachments,
?Form  $form = null 
)
protected
Parameters
list<string>$attachments

Definition at line 1046 of file class.ilMailFormGUI.php.

1047 {
1048 try {
1049 return $this->attachmentsFromFormUpload($attachments);
1051 $this->tpl->setOnScreenMessage(ilGlobalTemplateInterface::MESSAGE_TYPE_FAILURE, $e->getMessage());
1052 $this->showForm($form);
1053 return null;
1054 }
1055 }

References Vendor\Package\$e, ILIAS\UICore\GlobalTemplate\MESSAGE_TYPE_FAILURE, and showForm().

Referenced by saveMailBeforeSearch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $clock

readonly ClockFactory ilMailFormGUI::$clock
private

Definition at line 88 of file class.ilMailFormGUI.php.

◆ $ctrl

readonly ilCtrlInterface ilMailFormGUI::$ctrl
private

Definition at line 64 of file class.ilMailFormGUI.php.

◆ $fdm

readonly ilFileDataMail ilMailFormGUI::$fdm
private

Definition at line 84 of file class.ilMailFormGUI.php.

◆ $http

readonly GlobalHttpState ilMailFormGUI::$http
private

Definition at line 72 of file class.ilMailFormGUI.php.

◆ $lng

readonly ilLanguage ilMailFormGUI::$lng
private

Definition at line 65 of file class.ilMailFormGUI.php.

◆ $mail_form_type

string ilMailFormGUI::$mail_form_type = ''
private

Definition at line 77 of file class.ilMailFormGUI.php.

Referenced by showForm().

◆ $mbox

readonly ilMailbox ilMailFormGUI::$mbox
private

Definition at line 70 of file class.ilMailFormGUI.php.

◆ $mfile

readonly ilFileDataMail ilMailFormGUI::$mfile
private

Definition at line 71 of file class.ilMailFormGUI.php.

◆ $post

readonly ArrayBasedRequestWrapper ilMailFormGUI::$post
private

Definition at line 81 of file class.ilMailFormGUI.php.

◆ $purifier

readonly ilMailBodyPurifier ilMailFormGUI::$purifier
private

Definition at line 76 of file class.ilMailFormGUI.php.

◆ $query

readonly ArrayBasedRequestWrapper ilMailFormGUI::$query
private

Definition at line 82 of file class.ilMailFormGUI.php.

◆ $refinery

readonly Refinery ilMailFormGUI::$refinery
private

Definition at line 73 of file class.ilMailFormGUI.php.

◆ $request

readonly Psr Http Message ServerRequestInterface ilMailFormGUI::$request
private

Definition at line 80 of file class.ilMailFormGUI.php.

◆ $request_attachments

MailAttachments ilMailFormGUI::$request_attachments = null
private

Definition at line 74 of file class.ilMailFormGUI.php.

◆ $settings

readonly ilSetting ilMailFormGUI::$settings
private

Definition at line 86 of file class.ilMailFormGUI.php.

◆ $storage

readonly ILIAS ResourceStorage Services ilMailFormGUI::$storage
private

Definition at line 85 of file class.ilMailFormGUI.php.

◆ $tabs

readonly ilTabsGUI ilMailFormGUI::$tabs
private

Definition at line 67 of file class.ilMailFormGUI.php.

◆ $template_service

ilMailTemplateService ilMailFormGUI::$template_service
protected

Definition at line 75 of file class.ilMailFormGUI.php.

◆ $toolbar

readonly ilToolbarGUI ilMailFormGUI::$toolbar
private

Definition at line 68 of file class.ilMailFormGUI.php.

◆ $tpl

readonly ilGlobalTemplateInterface ilMailFormGUI::$tpl
private

Definition at line 63 of file class.ilMailFormGUI.php.

◆ $ui_factory

readonly Factory ilMailFormGUI::$ui_factory
private

Definition at line 78 of file class.ilMailFormGUI.php.

◆ $ui_renderer

readonly Renderer ilMailFormGUI::$ui_renderer
private

Definition at line 79 of file class.ilMailFormGUI.php.

◆ $umail

readonly ilFormatMail ilMailFormGUI::$umail
private

Definition at line 69 of file class.ilMailFormGUI.php.

◆ $upload_handler

readonly ilMailFormUploadHandlerGUI ilMailFormGUI::$upload_handler
private

Definition at line 83 of file class.ilMailFormGUI.php.

◆ $user

readonly ilObjUser ilMailFormGUI::$user
private

Definition at line 66 of file class.ilMailFormGUI.php.

◆ $user_search

readonly ILIAS User Search Search ilMailFormGUI::$user_search
private

Definition at line 87 of file class.ilMailFormGUI.php.

◆ MAIL_FORM_MODE_REGULAR_MAIL

final const string ilMailFormGUI::MAIL_FORM_MODE_REGULAR_MAIL = 'regular_mail'

Definition at line 60 of file class.ilMailFormGUI.php.

Referenced by buildFormElements().

◆ MAIL_FORM_MODE_SERIAL_LETTER

final const string ilMailFormGUI::MAIL_FORM_MODE_SERIAL_LETTER = 'serial_letter'

Definition at line 61 of file class.ilMailFormGUI.php.

Referenced by buildFormElements().

◆ MAIL_FORM_TYPE_ADDRESS

final const string ilMailFormGUI::MAIL_FORM_TYPE_ADDRESS = 'address'

Definition at line 55 of file class.ilMailFormGUI.php.

Referenced by showForm().

◆ MAIL_FORM_TYPE_ATTACH

final const string ilMailFormGUI::MAIL_FORM_TYPE_ATTACH = 'attach'

◆ MAIL_FORM_TYPE_DRAFT

final const string ilMailFormGUI::MAIL_FORM_TYPE_DRAFT = 'draft'

Definition at line 57 of file class.ilMailFormGUI.php.

Referenced by ilMailFolderGUI\executeTableAction(), and showForm().

◆ MAIL_FORM_TYPE_FORWARD

final const string ilMailFormGUI::MAIL_FORM_TYPE_FORWARD = 'forward'

Definition at line 56 of file class.ilMailFormGUI.php.

Referenced by ilMailFolderGUI\executeTableAction(), and showForm().

◆ MAIL_FORM_TYPE_NEW

◆ MAIL_FORM_TYPE_OUTBOX

final const string ilMailFormGUI::MAIL_FORM_TYPE_OUTBOX = 'outbox'

Definition at line 58 of file class.ilMailFormGUI.php.

Referenced by showForm().

◆ MAIL_FORM_TYPE_REPLY

final const string ilMailFormGUI::MAIL_FORM_TYPE_REPLY = 'reply'

◆ MAIL_FORM_TYPE_ROLE

final const string ilMailFormGUI::MAIL_FORM_TYPE_ROLE = 'role'

◆ MAIL_FORM_TYPE_SEARCH_RESULT

final const string ilMailFormGUI::MAIL_FORM_TYPE_SEARCH_RESULT = 'search_res'

◆ PARAM_SCHEDULED_EDIT_FROM_OUTBOX

final const string ilMailFormGUI::PARAM_SCHEDULED_EDIT_FROM_OUTBOX = 'scheduled_edit_from_outbox'

Definition at line 59 of file class.ilMailFormGUI.php.

Referenced by ilMailFolderGUI\executeTableAction().


The documentation for this class was generated from the following file: