Move email subject before ntopng instance name

This commit is contained in:
Alfredo Cardigliano 2023-11-02 15:35:54 +01:00
parent 3ece52646f
commit 6f309a4a0f

View file

@ -107,7 +107,10 @@ function email.sendEmail(subject, message_body, settings)
local product = ntop.getInfo(false).product
local info = ntop.getHostInformation()
subject = product .. " [" .. info.instance_name .. " (" .. info.ip .. ")] " .. subject
if not isEmptyString(subject) then
subject = subject .. " - "
end
subject = subject .. product .. " [" .. info.instance_name .. " (" .. info.ip .. ")]"
if not string.find(smtp_server, "://") then
smtp_server = "smtp://" .. smtp_server