Mail Transport use BCC option (#15554)

Option to use BCC instead of to field for emails
This commit is contained in:
Tony Murray
2023-11-08 08:36:09 -06:00
committed by GitHub
parent 7c006e9625
commit 63eeeb7172
2 changed files with 14 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ class Mail extends Transport
$msg = preg_replace("/(?<!\r)\n/", "\r\n", $alert_data['msg']);
}
return \LibreNMS\Util\Mail::send($emails, $alert_data['title'], $msg, $html, $this->config['attach-graph'] ?? null);
return \LibreNMS\Util\Mail::send($emails, $alert_data['title'], $msg, $html, $this->config['bcc'] ?? false, $this->config['attach-graph'] ?? null);
}
public static function configTemplate(): array
@@ -83,6 +83,13 @@ class Mail extends Transport
'type' => 'select',
'options' => $roles,
],
[
'title' => 'BCC',
'name' => 'bcc',
'descr' => 'Use BCC instead of TO',
'type' => 'checkbox',
'default' => false,
],
[
'title' => 'Include Graphs',
'name' => 'attach-graph',