ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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