mod/notification-email: use $FileExists ...

... to work around restrictions in new file handling.
This commit is contained in:
Christian Hesse 2025-05-30 22:46:03 +02:00
parent daee05dbd7
commit e3284ca770

View file

@ -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.");