ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilNotificationMailHandler.php
Go to the documentation of this file.
1<?php
2require_once 'Services/Notifications/classes/class.ilNotificationHandler.php';
3
8{
9 public function notify(ilNotificationObject $notification)
10 {
11 // use a specific sender or ANONYMOUS
12 $sender_id = (isset($notification->handlerParams['mail']['sender']) ? $notification->handlerParams['mail']['sender'] : ANONYMOUS_USER_ID);
13 include_once 'Services/Mail/classes/class.ilMail.php';
14 $mail = new ilMail($sender_id);
15 $mail->appendInstallationSignature(true);
16 $mail->enqueue(
17 $notification->user->getLogin(),
18 '',
19 '',
20 $notification->title,
21 $notification->longDescription,
22 []
23 );
24
25 //mail($notification->user->getEmail(), $notification->title, $notification->longDescription);
26 }
27}
An exception for terminatinating execution or to throw for unit testing.
Base class for notification handlers.
Notification handler for sending notifications the to recipients email address.
notify(ilNotificationObject $notification)
A concrete notification based on the ilNotificationConfiguration and returned by ilNotificationConfig...