1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

refactor send notify logic

This commit is contained in:
Timothy
2017-11-06 16:48:43 +08:00
parent 4c4f34c55b
commit 7a65d4e0ea
6 changed files with 132 additions and 13 deletions

View File

@@ -76,7 +76,8 @@ func (handler *DNSPodHandler) DomainLoop(domain *godns.Domain, panicChan chan<-
// Send mail notification if notify is enabled
if handler.Configuration.Notify.Enabled {
godns.SendNotify(handler.Configuration, currentIP)
log.Print("Sending notification to:", handler.Configuration.Notify.SendTo)
godns.SendNotify(handler.Configuration, fmt.Sprintf("%s.%s", subDomain, domain.DomainName), currentIP)
}
} else {

View File

@@ -61,7 +61,8 @@ func (handler *HEHandler) DomainLoop(domain *godns.Domain, panicChan chan<- godn
// Send mail notification if notify is enabled
if handler.Configuration.Notify.Enabled {
godns.SendNotify(handler.Configuration, currentIP)
log.Print("Sending notification to:", handler.Configuration.Notify.SendTo)
godns.SendNotify(handler.Configuration, fmt.Sprintf("%s.%s", subDomain, domain.DomainName), currentIP)
}
}
}