make more than one email receipient possible
This commit is contained in:
parent
c6c83ce708
commit
2d93042fff
5
alert.go
5
alert.go
|
|
@ -76,7 +76,10 @@ func sendAlert(deveui string, alertMessage string) {
|
|||
emailalarmactive := getDevEmailAlarmactive(deveui)
|
||||
fmt.Printf("sendAlert: deveui=%s, email=%s, emailalarmactive=%s\n", deveui, email, emailalarmactive)
|
||||
if emailalarmactive == "1" {
|
||||
sendEmail(email, alertMessage)
|
||||
emails := strings.Split(email, ",")
|
||||
for _, em := range emails {
|
||||
sendEmail(em, alertMessage)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue