From b77d0dd6c5574d9841cd5d040dfcc351a58ccb82 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 27 Aug 2008 06:58:33 -0400
Subject: [PATCH] - added options to use syslog instead of log file (#1484850) - added Logging & Debugging section in Installer - fixed config from $_POST for next installer steps saving - fixed and re-enabled debug_level setting in installer

---
 program/steps/mail/sendmail.inc |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 9888c5a..25d95f9 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -420,19 +420,13 @@
   {
   if ($CONFIG['smtp_log'])
     {
-    $log_entry = sprintf(
+    write_log('sendmail', sprintf(
       "[%s] User: %d on %s; Message for %s; %s\n",
       date("d-M-Y H:i:s O", mktime()),
       $_SESSION['user_id'],
       $_SERVER['REMOTE_ADDR'],
       $mailto,
-      !empty($smtp_response) ? join('; ', $smtp_response) : '');
-
-    if ($fp = @fopen($CONFIG['log_dir'].'/sendmail', 'a'))
-      {
-      fwrite($fp, $log_entry);
-      fclose($fp);
-      }
+      !empty($smtp_response) ? join('; ', $smtp_response) : ''));
     }
 
   rcmail_compose_cleanup();

--
Gitblit v1.9.1