ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTermsOfServiceWithdrawnMimeMail.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
8{
9 public function send() : void
10 {
11 global $DIC;
12
13 $lng = $DIC['lng'];
14
17 $subjectUser = $data['user'];
18
19 foreach ($this->getRecipients() as $rcp) {
20 try {
21 $this->handleCurrentRecipient($rcp);
22 } catch (ilMailException $e) {
23 continue;
24 }
25
26 if (!($subjectUser instanceof ilObjUser) || !$this->getCurrentRecipient()) {
27 continue;
28 }
29
30 $this->initMimeMail();
32
33 $this->setSubject($this->getLanguage()->txt('withdrawal_mail_subject'));
34
35 $body = str_ireplace("[BR]", "\n", sprintf(
36 $this->getLanguage()->txt('withdrawal_mail_text'),
37 $subjectUser->getFullname(),
38 $subjectUser->getLogin(),
39 $subjectUser->getExternalAccount()
40 ));
41 $this->appendBody($body);
43
44 $this->sendMimeMail($this->getCurrentRecipient());
45 }
46
48 }
49}
An exception for terminatinating execution or to throw for unit testing.
static setLanguage($a_lng)
set language
Class ilMailException.
appendBody($a_body)
Append body text.
getRecipients()
get array of recipients
static _getInstallationSignature()
Base class for mime mail notifications.
Class ilTermsOfServiceWithdrawnMimeMail.
global $DIC
Definition: goto.php:24
$lng
$data
Definition: storeScorm.php:23
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:82