mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-21 01:25:52 +02:00
mod/notification-email: use $FileExists ...
... to work around restrictions in new file handling.
This commit is contained in:
parent
daee05dbd7
commit
e3284ca770
1 changed files with 2 additions and 1 deletions
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global EMailGenerateFrom;
|
:global EMailGenerateFrom;
|
||||||
|
:global FileExists;
|
||||||
:global IsDNSResolving;
|
:global IsDNSResolving;
|
||||||
:global IsTimeSync;
|
:global IsTimeSync;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
@ -93,7 +94,7 @@
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
:local Attach ({});
|
:local Attach ({});
|
||||||
:foreach File in=[ :toarray [ $EitherOr ($Message->"attach") "" ] ] do={
|
:foreach File in=[ :toarray [ $EitherOr ($Message->"attach") "" ] ] do={
|
||||||
:if ([ :len [ /file/find where name=$File ] ] = 1) do={
|
:if ([ $FileExists $File ] = true) do={
|
||||||
:set Attach ($Attach, $File);
|
:set Attach ($Attach, $File);
|
||||||
} else={
|
} else={
|
||||||
$LogPrint warning $0 ("File '" . $File . "' does not exist, can not attach.");
|
$LogPrint warning $0 ("File '" . $File . "' does not exist, can not attach.");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue