mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $SendEMail: invert condition
This commit is contained in:
@ -389,18 +389,20 @@
|
|||||||
:global EmailGeneralTo;
|
:global EmailGeneralTo;
|
||||||
:global EmailGeneralCc;
|
:global EmailGeneralCc;
|
||||||
|
|
||||||
:if ([ :len $EmailGeneralTo ] > 0) do={
|
:if ([ :len $EmailGeneralTo ] = 0) do={
|
||||||
:do {
|
:return;
|
||||||
:local Signature [ / system note get note ];
|
}
|
||||||
:if ([ :len $Signature ] > 0) do={
|
|
||||||
:set Signature ("\n-- \n" . $Signature);
|
:do {
|
||||||
}
|
:local Signature [ / system note get note ];
|
||||||
/ tool e-mail send to=$EmailGeneralTo cc=$EmailGeneralCc \
|
:if ([ :len $Signature ] > 0) do={
|
||||||
subject=("[" . $Identity . "] " . $Subject) \
|
:set Signature ("\n-- \n" . $Signature);
|
||||||
body=($Message . $Signature) file=$Attach;
|
|
||||||
} on-error={
|
|
||||||
:log warning "Failed sending notification mail!";
|
|
||||||
}
|
}
|
||||||
|
/ tool e-mail send to=$EmailGeneralTo cc=$EmailGeneralCc \
|
||||||
|
subject=("[" . $Identity . "] " . $Subject) \
|
||||||
|
body=($Message . $Signature) file=$Attach;
|
||||||
|
} on-error={
|
||||||
|
:log warning "Failed sending notification mail!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user