Project

General

Profile

Feature #2026

[Patch] Multiple SMTP notice recipients

Added by Peter O almost 8 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Notifications
Target version:
Start date:
11/24/2011
Due date:
% Done:

100%

Estimated time:

Description

When trying to use multiple smtp notification recipients in 2.0, I ran into the fact that it isn't possible to enter multiple recipient addresses. When checking the source code, I found out that the change to the code would be very small because the used class already supports multiple recipients.

I've included a small patch that can be applied to notices.inc

Multiple addresses can now be entered in the same textfield, separated by a ,

notices.patch (157 Bytes) notices.patch Patch for notices.inc Peter O, 11/24/2011 04:30 AM
mail_reports.inc.patch (216 Bytes) mail_reports.inc.patch Vladimir Poludintsev, 11/12/2012 10:19 PM

History

#1 Updated by Peter O over 7 years ago

Something for version 2.1 maybe?

#2 Updated by Chris Buechler over 7 years ago

  • Target version set to 2.1

#3 Updated by Chris Buechler over 7 years ago

  • Status changed from New to Assigned
  • Assignee set to Darren Embry

#4 Updated by Darren Embry over 7 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

#5 Updated by Vladimir Poludintsev almost 7 years ago

So as to change mail_reports.inc to send report to multiple addresses

--- /etc/inc/mail_reports.inc
++ /etc/inc/mail_reports.inc.orig
@ -189,9 +189,7 @
$mail->AddReplyTo($config['notifications']['smtp']['fromaddress'], "Firewall Graph Report");
$mail->SetFrom($config['notifications']['smtp']['fromaddress'], "Firewall Graph Report");
$address = $config['notifications']['smtp']['notifyemailaddress'];
- foreach (preg_split('/\s*,\s*/', $address) as $email) {
- $mail->AddAddress($email, "Report Recipient");
- }
$mail->AddAddress($address, "Report Recipient");
$mail->Subject = "{$config['system']['hostname']}.{$config['system']['domain']} Graph Report: {$headertext}";
$mail->Body .= "This is a periodic graph report from your firewall, {$config['system']['hostname']}.{$config['system']['domain']}.<br/><br/>Current report: {$headertext}\n";
if(is_array($attachments)) {

Also available in: Atom PDF