ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCronDeleteInactiveUserReminderMailNotification.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  public function __construct()
26  {
28  }
29 
30 
31  protected function initLanguage(int $a_usr_id): void
32  {
33  parent::initLanguage($a_usr_id);
34  $this->getLanguage()->loadLanguageModule('user');
35  }
36 
37  public function send(): void
38  {
39  global $DIC;
40 
41  $lng = $DIC['lng'];
42 
43  $additional_information = $this->getAdditionalInformation();
44 
47 
48  foreach ($this->getRecipients() as $rcp) {
49  try {
50  $this->handleCurrentRecipient($rcp);
51  } catch (ilMailException $e) {
52  continue;
53  }
54 
55  $this->initMimeMail();
56 
58  $date_for_deletion = ilDatePresentation::formatDate(new ilDate($additional_information["date"], IL_CAL_UNIX));
59 
60  $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
61  $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname, "\n\n", $additional_information["www"], $date_for_deletion);
62  $this->appendBody($body);
64  $this->sendMimeMail($this->getCurrentRecipient());
65  }
66 
69  }
70 }
$lng
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
static setLanguage(ilLanguage $a_lng)
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
static setUseRelativeDates(bool $a_status)
set use relative dates
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstallationSignature()