ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCronDeleteInactiveUserReminderMailNotification.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/Mail/classes/class.ilMimeMailNotification.php';
5 include_once './Services/Mail/classes/class.ilMimeMail.php';
6 
14 {
18  public function __construct()
19  {
21  }
22 
23  protected function initLanguage($a_usr_id)
24  {
25  parent::initLanguage($a_usr_id);
26  $this->getLanguage()->loadLanguageModule('user');
27  }
28 
29  public function send()
30  {
31  global $DIC;
32 
33  $lng = $DIC['lng'];
34 
35  $additional_information = $this->getAdditionalInformation();
36 
39 
40  foreach ($this->getRecipients() as $rcp) {
41  try {
42  $this->handleCurrentRecipient($rcp);
43  } catch (ilMailException $e) {
44  continue;
45  }
46 
47  $this->initMimeMail();
48 
50  $date_for_deletion = ilDatePresentation::formatDate(new ilDate($additional_information["date"], IL_CAL_UNIX));
51 
52  $this->setSubject($this->getLanguage()->txt('del_mail_subject'));
53  $body = sprintf($this->getLanguage()->txt("del_mail_body"), $rcp->fullname, "\n\n", $additional_information["www"], $date_for_deletion);
54  $this->appendBody($body);
56  $this->sendMimeMail($this->getCurrentRecipient());
57  }
58 
61  }
62 }
Class ilMailException.
static setUseRelativeDates($a_status)
set use relative dates
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static useRelativeDates()
check if relative dates are used
static setLanguage($a_lng)
set language
Class for single dates.
$lng
global $DIC
Definition: goto.php:24
getRecipients()
get array of recipients
Base class for mime mail notifications.
__construct(Container $dic, ilPlugin $plugin)
appendBody($a_body)
Append body text.
static _getInstallationSignature()