ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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();
31  $this->initLanguageByIso2Code();
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 }
$data
Definition: storeScorm.php:23
Class ilMailException.
static setLanguage($a_lng)
set language
$lng
global $DIC
Definition: goto.php:24
getRecipients()
get array of recipients
Base class for mime mail notifications.
appendBody($a_body)
Append body text.
Class ilTermsOfServiceWithdrawnMimeMail.
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:82
static _getInstallationSignature()