ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilNotificationMailHandler.php
Go to the documentation of this file.
1<?php
2require_once 'Services/Notifications/classes/class.ilNotificationHandler.php';
3
8 public function notify(ilNotificationObject $notification) {
9 // use a specific sender or ANONYMOUS
10 $sender_id = (isset($notification->handlerParams['mail']['sender']) ? $notification->handlerParams['mail']['sender'] : ANONYMOUS_USER_ID);
11 include_once 'Services/Mail/classes/class.ilMail.php';
12 $mail = new ilMail($sender_id);
13 $mail->appendInstallationSignature(true);
14 $mail->sendMail(
15 $notification->user->getLogin(),
16 '',
17 '',
18 $notification->title,
19 $notification->longDescription,
20 false,
21 array('normal')
22 );
23
24 //mail($notification->user->getEmail(), $notification->title, $notification->longDescription);
25 }
26}
27
An exception for terminatinating execution or to throw for unit testing.
This class handles base functions for mail handling.
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...