1: <?php
2: 3: 4: 5: 6: 7:
8: class Ansel_Report_mail extends Ansel_Report {
9:
10: 11: 12:
13: function report($message, $users = array())
14: {
15: global $conf;
16:
17: if (empty($users)) {
18: $to = $conf['report_content']['email'];
19: } else {
20:
21:
22: $to = $this->_getUserEmail($users);
23: if (empty($to)) {
24: $to = $conf['report_content']['email'];
25: }
26: }
27:
28: $mail = new Horde_Mime_Mail(array(
29: 'body' => $this->getMessage($message),
30: 'Subject' => $this->getTitle(),
31: 'To' => $to,
32:
33: 'Sender' => 'horde-problem@' . $conf['report_content']['maildomain'],
34: 'From' => $this->getUserEmail()));
35:
36: return $mail->send($GLOBALS['injector']->getInstance('Horde_Mail'));
37: }
38: }
39: