From 99a95d310e87af7e498eac886993f5f1a8f9f174 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 1 Oct 2021 20:39:59 +0200 Subject: global-functions: $NotificationFunctions->"email": check for valid settings No need to queue mails if 'address' and 'from' are not specified... --- global-functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global-functions b/global-functions index 22af3e2..80d6e6a 100644 --- a/global-functions +++ b/global-functions @@ -543,7 +543,8 @@ :local To [ $EitherOr ($EmailGeneralToOverride->($Notification->"origin")) $EmailGeneralTo ]; :local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ]; - :if ([ :len $To ] = 0) do={ + :local EMailSettings [ / tool e-mail get ]; + :if ([ :len $To ] = 0 || ($EMailSettings->"address") = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={ :return false; } -- cgit v1.2.3-54-g00ecf