Skip to content

Commit

Permalink
Fixing #5417 - BCC contents in Cacti.log
Browse files Browse the repository at this point in the history
Cacti mailer log message misses 'bcc' addresses in log notification
  • Loading branch information
TheWitness committed Jul 23, 2023
1 parent 978bb65 commit f259dcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Cacti CHANGELOG
-issue#5403: Cacti Log regular expression filters can not calculate 'does not match' properly
-issue#5413: Rows Per Page - Not all options are available
-issue#5414: Plugins are unable to modify fields in the setting 'Change Device Settings'
-issue#5417: Cacti mailer log message misses 'bcc' addresses in log notification
-feature#5375: Add template for Fortinet firewall and Aruba Instant cluster
-feature#5393: Add template for SNMP printer
-feature: Update Cisco Device Template to include HSRP graph template
Expand Down
8 changes: 4 additions & 4 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5069,12 +5069,12 @@ function mailer($from, $to, $cc, $bcc, $replyto, $subject, $body, $body_text = '
$end_time = microtime(true);

if ($error != '') {
$message = sprintf("%s: Mail %s via %s from '%s', to '%s', cc '%s', and took %2.2f seconds, Subject '%s'%s",
$rtype, $rmsg, $method, $fromText, $toText, $ccText, ($end_time - $start_time), $subject,
$message = sprintf("%s: Mail %s via %s from '%s', to '%s', cc '%s', bcc '%s', and took %2.2f seconds, Subject '%s'%s",
$rtype, $rmsg, $method, $fromText, $toText, $ccText, $bccText, ($end_time - $start_time), $subject,
", Error: $error");
} else {
$message = sprintf("%s: Mail %s via %s from '%s', to '%s', cc '%s', and took %2.2f seconds, Subject '%s'",
$rtype, $rmsg, $method, $fromText, $toText, $ccText, ($end_time - $start_time), $subject);
$message = sprintf("%s: Mail %s via %s from '%s', to '%s', cc '%s', bcc '%s', and took %2.2f seconds, Subject '%s'",
$rtype, $rmsg, $method, $fromText, $toText, $ccText, $bccText, ($end_time - $start_time), $subject);
}

cacti_log($message, false, 'MAILER');
Expand Down

0 comments on commit f259dcc

Please sign in to comment.