Feature #2026
closed
[Patch] Multiple SMTP notice recipients
Added by Peter O almost 13 years ago.
Updated about 12 years ago.
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
Something for version 2.1 maybe?
- Target version set to 2.1
- Status changed from New to Assigned
- Assignee set to Darren Embry
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
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