ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilNotificationMailHandler.php
Go to the documentation of this file.
1 <?php
2 require_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 
Notification handler for sending notifications the to recipients email address.
A concrete notification based on the ilNotificationConfiguration and returned by ilNotificationConfig...
Base class for notification handlers.
This class handles base functions for mail handling.
Create styles array
The data for the language used.
notify(ilNotificationObject $notification)