make more than one email receipient possible
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user