Skip to content

Commit

Permalink
Improve log message on message send
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 21, 2014
1 parent ba854bc commit 8f42df8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions imp/lib/Compose.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ public function buildAndSendMessage(
$body, $header, IMP_Prefs_Identity $identity, array $opts = array()
)
{
global $conf, $injector, $notification, $prefs, $registry;
global $conf, $injector, $notification, $prefs, $registry, $session;

/* We need at least one recipient & RFC 2822 requires that no 8-bit
* characters can be in the address fields. */
Expand Down Expand Up @@ -944,8 +944,15 @@ public function buildAndSendMessage(
}
}

$entry = sprintf("%s Message sent to %s from %s", $_SERVER['REMOTE_ADDR'], $recipients, $registry->getAuth());
Horde::log($entry, 'INFO');
Horde::log(
sprintf(
"Message sent to %s from %s (%s)",
$recipients,
$registry->getAuth(),
$session->get('horde', 'auth/remoteAddr')
),
'INFO'
);

/* Should we save this message in the sent mail mailbox? */
if (!empty($opts['sent_mail']) &&
Expand Down

0 comments on commit 8f42df8

Please sign in to comment.