Added support for multiple emails #3885

merged 3 commits into from Jul 28, 2016


None yet

3 participants

laf commented Jul 26, 2016

Fix #3860

Doesn't work with default contact - you should set an alias to be used on your email server here.

But users, sysContact and sysContact override can all have comma separated emails.

laf added some commits Jul 26, 2016
@laf laf Added support for multiple emails 0e197e9
@laf laf Updated alerting doc
@murrant murrant commented on the diff Jul 27, 2016
@@ -281,5 +281,18 @@ function GetContacts($results) {
$contacts[$user['email']] = $user['realname'];
- return $contacts;
+ $tmp_contacts = array();
+ foreach ($contacts as $email => $name) {
+ if (strstr($email, ',')) {
+ $split_contacts = preg_split("/[,\s]+/", $email);
murrant Jul 27, 2016 Contributor

Accidental leading or or trailing whitespace will cause empty entries in $split_contacts. Probably should trim() or check for empty emails.

Or maybe it doesn't matter?

laf Jul 28, 2016 Member


@laf laf Added check for empty emails
@murrant murrant merged commit 8553646 into librenms:master Jul 28, 2016

2 checks passed

Auto-Deploy Build finished.
continuous-integration/travis-ci/pr The Travis CI build passed
@laf laf deleted the laf:issue-3860 branch Jul 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment