Improve email subject for traffic and vs reports (#7969)

This commit is contained in:
Alfredo Cardigliano 2023-11-02 16:07:03 +01:00
parent 6f309a4a0f
commit f903a44771
3 changed files with 39 additions and 7 deletions

View file

@ -110,7 +110,7 @@ function email.sendEmail(subject, message_body, settings)
if not isEmptyString(subject) then
subject = subject .. " - "
end
subject = subject .. product .. " [" .. info.instance_name .. " (" .. info.ip .. ")]"
subject = subject .. product .. " @ " .. info.instance_name .. " (" .. info.ip .. ")"
if not string.find(smtp_server, "://") then
smtp_server = "smtp://" .. smtp_server
@ -191,10 +191,7 @@ function email.dequeueRecipientAlerts(recipient, budget)
-- Prepare email
-- Subject
local subject = ""
if #notifications > 1 then
subject = "(" .. i18n("alert_messages.x_alerts", {num=#notifications}) .. ")"
end
local subject = format_utils.formatSubject(notifications)
-- Body
local messages = {}