Project

General

Profile

Actions

Feature #2026

closed

[Patch] Multiple SMTP notice recipients

Added by Peter O over 12 years ago. Updated over 11 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:

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 ,


Files

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
Actions #1

Updated by Peter O about 12 years ago

Something for version 2.1 maybe?

Actions #2

Updated by Chris Buechler about 12 years ago

  • Target version set to 2.1
Actions #3

Updated by Chris Buechler about 12 years ago

  • Status changed from New to Assigned
  • Assignee set to Darren Embry
Actions #4

Updated by Darren Embry about 12 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Vladimir Poludintsev over 11 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)) {

Actions

Also available in: Atom PDF