mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-07 20:16:52 +03:00
internet-detector-mod-email: minor improvements
This commit is contained in:
@@ -29,6 +29,7 @@ local Module = {
|
|||||||
mailSecurity = "tls",
|
mailSecurity = "tls",
|
||||||
msgTextPattern1 = "[%s]: %s: %s", -- Connected (host, instance, message)
|
msgTextPattern1 = "[%s]: %s: %s", -- Connected (host, instance, message)
|
||||||
msgTextPattern2 = "[%s]: %s: %s", -- Disconnected (host, instance, message)
|
msgTextPattern2 = "[%s]: %s: %s", -- Disconnected (host, instance, message)
|
||||||
|
msgSubPattern = "%s notification", -- Subject (host)
|
||||||
status = nil,
|
status = nil,
|
||||||
_enabled = false,
|
_enabled = false,
|
||||||
_deadCounter = 0,
|
_deadCounter = 0,
|
||||||
@@ -109,7 +110,7 @@ function Module:sendMessage(msg, textPattern)
|
|||||||
self.mta, verboseArg, securityArgs, self.mailSmtp, self.mailSmtpPort,
|
self.mta, verboseArg, securityArgs, self.mailSmtp, self.mailSmtpPort,
|
||||||
self.mtaConnectTimeout, self.mtaReadTimeout,
|
self.mtaConnectTimeout, self.mtaReadTimeout,
|
||||||
self.mailUser, self.mailPassword, self.mailSender, self.mailRecipient,
|
self.mailUser, self.mailPassword, self.mailSender, self.mailRecipient,
|
||||||
string.format("%s notification", self.hostAlias),
|
string.format(self.msgSubPattern, self.hostAlias),
|
||||||
emailMsg)
|
emailMsg)
|
||||||
|
|
||||||
-- Debug
|
-- Debug
|
||||||
|
|||||||
Reference in New Issue
Block a user