Feature #2026
closed[Patch] Multiple SMTP notice recipients
100%
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
Updated by Chris Buechler almost 13 years ago
- Status changed from New to Assigned
- Assignee set to Darren Embry
Updated by Darren Embry almost 13 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
fixed, a little bit more robustly: https://github.com/bsdperimeter/pfsense/commit/90dd642352ea4c26eec633d1f075f12262e18ccb
Updated by Vladimir Poludintsev about 12 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)) {
Updated by Vladimir Poludintsev about 12 years ago
- File mail_reports.inc.patch mail_reports.inc.patch added