mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 12:24:28 +02:00
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:
parent
f780b205a9
commit
99a95d310e
1 changed files with 2 additions and 1 deletions
|
@ -543,7 +543,8 @@
|
||||||
:local To [ $EitherOr ($EmailGeneralToOverride->($Notification->"origin")) $EmailGeneralTo ];
|
:local To [ $EitherOr ($EmailGeneralToOverride->($Notification->"origin")) $EmailGeneralTo ];
|
||||||
:local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ];
|
: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;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue