ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilRegistrationMimeMailNotification.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28
29 public function send(): void
30 {
31 if ($this->getType() === self::TYPE_NOTIFICATION_ACTIVATION) {
32 $additional_information = $this->getAdditionalInformation();
36 $user = $additional_information['usr'];
37 $this->getLanguage()->loadLanguageModule("registration");
38
39 foreach ($this->getRecipients() as $rcp) {
40 try {
41 $this->handleCurrentRecipient($rcp);
42 } catch (ilMailException $e) {
43 continue;
44 }
45
46 $this->initMimeMail();
47 $this->setSubject($this->getLanguage()->txt('reg_mail_subject_confirmation'));
48 $this->setBody($this->getLanguage()->txt('reg_mail_body_salutation') . ' ' . $user->getFullname() . ',');
49 $this->appendBody("\n\n");
50 $this->appendBody($this->getLanguage()->txt('reg_mail_body_activation'));
51 $this->appendBody("\n");
52 $this->appendBody(ILIAS_HTTP_PATH . '/confirmReg.php?client_id=' . CLIENT_ID . '&rh=' . $user->generateRegistrationHash());
53 $this->appendBody("\n\n");
54 $this->appendBody(sprintf(
55 $this->getLanguage()->txt('reg_mail_body_2_confirmation'),
57 $additional_information['hash_lifetime'],
58 false,
59 $this->getLanguage()
60 )
61 ));
62 $this->appendBody("\n\n");
63 $this->appendBody($this->getLanguage()->txt('reg_mail_body_3_confirmation'));
65
66 $this->sendMimeMail($this->getCurrentRecipient());
67 }
68 }
69 }
70}
static secondsToString(int $seconds, bool $force_with_seconds=false, ?ilLanguage $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static _getInstallationSignature()
Class for mime mail registration notifications.
const CLIENT_ID
Definition: constants.php:41
catch(ilCmiXapiException $e) send($response)
Definition: xapitoken.php:100