ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTermsOfServiceWithdrawnMimeMail.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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();
49  $this->initLanguageByIso2Code();
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 }
$lng
static setLanguage(ilLanguage $a_lng)
global $DIC
Definition: feed.php:28
Class ilTermsOfServiceWithdrawnMimeMail.
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:100
static _getInstallationSignature()