ILIAS  release_7 Revision v7.30-3-g800a261c036
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
4include_once './Services/Mail/classes/class.ilMimeMailNotification.php';
5include_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}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setLanguage($a_lng)
set language
static setUseRelativeDates($a_status)
set use relative dates
static useRelativeDates()
check if relative dates are used
Class for single dates.
Class ilMailException.
appendBody($a_body)
Append body text.
getRecipients()
get array of recipients
static _getInstallationSignature()
Base class for mime mail notifications.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$lng