global-functions: $NotificationFunctions->"email": check for valid settings

No need to queue mails if 'address' and 'from' are not specified...
This commit is contained in:
Christian Hesse 2021-10-01 20:39:59 +02:00
parent f780b205a9
commit 99a95d310e
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}