ILIAS  release_8 Revision v8.24
class.ilTermsOfServiceWithdrawnMimeMail.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 public function send(): void
28 {
29 global $DIC;
30
31 $lng = $DIC['lng'];
32
35 $subjectUser = $data['user'];
36
37 foreach ($this->getRecipients() as $rcp) {
38 try {
39 $this->handleCurrentRecipient($rcp);
40 } catch (ilMailException $e) {
41 continue;
42 }
43
44 if (!($subjectUser instanceof ilObjUser) || !$this->getCurrentRecipient()) {
45 continue;
46 }
47
48 $this->initMimeMail();
50
51 $this->setSubject($this->getLanguage()->txt('withdrawal_mail_subject'));
52
53 $body = str_ireplace('[BR]', "\n", sprintf(
54 $this->getLanguage()->txt('withdrawal_mail_text'),
55 $subjectUser->getFullname(),
56 $subjectUser->getLogin(),
57 $subjectUser->getExternalAccount()
58 ));
59 $this->appendBody($body);
61
62 $this->sendMimeMail($this->getCurrentRecipient());
63 }
64
66 }
67}
static setLanguage(ilLanguage $a_lng)
Class ilMailException.
static _getInstallationSignature()
Base class for mime mail notifications.
User class.
global $DIC
Definition: feed.php:28
$lng
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:100