blob: f8d4f02278f54dd82b50a015f037ca5d6a70c161 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
/*
* debug_message.php
*
*
*
*/
class debug_message_class extends email_message_class
{
private $logfile ="";
function __construct() {
$this->logfile = $GLOBALS['TMP_PATH'] . '/studip-mail-debug.log';
}
function SendMail($to,$subject,$body,$headers,$return_path) {
if ($log = fopen($this->logfile, "a")){
if(strlen($headers)) $headers.="\n";
fwrite($log, "\n-- " . strftime("%x %X"). ' ' . $GLOBALS['auth']->auth['uname']);
fwrite($log, "\nTo: ".$to."\nSubject: ".$subject."\n".$headers."\n");
fwrite($log,$body."\n");
fclose($log);
}
}
}
?>
|