diff options
author | Christian Hesse <mail@eworm.de> | 2021-10-01 20:39:59 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-10-01 20:39:59 +0200 |
commit | 99a95d310e87af7e498eac886993f5f1a8f9f174 (patch) | |
tree | dc5b6b1d720b89b124d996a3a6a4fbade58c7535 | |
parent | f780b205a9b1dfc7b3229916309661c7c115d965 (diff) |
global-functions: $NotificationFunctions->"email": check for valid settings
No need to queue mails if 'address' and 'from' are not specified...
-rw-r--r-- | global-functions | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |