mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:42:22 +08:00
Emails: resurrect template notification (#18686)
* Emails: resurrect template notification * Phantomjs (oh yeah, there is another dev dep phantom :-) was failing for the generation of the html templates so I had to update the dependencies in order to fix it. While doing that I update the scripts field and docs for it as well. yarn.lock is included * Move splitting of the emails to separate helper function, since more services coming up that would need to use this functionality * Add support for enterprise specific email letters. Probably could be done in the better way, but it's not a priority right now
This commit is contained in:
14
pkg/util/split_email.go
Normal file
14
pkg/util/split_email.go
Normal file
@ -0,0 +1,14 @@
|
||||
package util
|
||||
|
||||
import "strings"
|
||||
|
||||
// SplitEmails splits addresses with a few different ways
|
||||
func SplitEmails(emails string) []string {
|
||||
return strings.FieldsFunc(emails, func(r rune) bool {
|
||||
switch r {
|
||||
case ',', ';', '\n':
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user