ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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->sendMail(
17 $notification->user->getLogin(),
18 '',
19 '',
20 $notification->title,
21 $notification->longDescription,
22 false,
23 array('normal')
24 );
25
26 //mail($notification->user->getEmail(), $notification->title, $notification->longDescription);
27 }
28}
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...