mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
mod/notification-email: $NotificationFunctions->"email": support hook for signature
You can compose your own signature by creating a function:
:global NotificationEMailSignature do={
:global EitherOr;
:local RouterBoard [ /system/routerboard/get ];
:return ( \
[ $EitherOr ($RouterBoard->"board-name") ($RouterBoard->"model") ] . " s/n " . $RouterBoard->"serial-number" . " | " . \
"RouterOS " . [ /system/package/update/get installed-version ] . " | " . \
"IP " . [ /ip/cloud/get public-address ]);
}
This commit is contained in:
@@ -131,6 +131,7 @@
|
||||
|
||||
:global EitherOr;
|
||||
:global IfThenElse;
|
||||
:global NotificationEMailSignature;
|
||||
:global NotificationEMailSubject;
|
||||
|
||||
:local To [ $EitherOr ($EmailGeneralToOverride->($Notification->"origin")) $EmailGeneralTo ];
|
||||
@@ -144,7 +145,7 @@
|
||||
:if ([ :typeof $EmailQueue ] = "nothing") do={
|
||||
:set EmailQueue ({});
|
||||
}
|
||||
:local Signature [ /system/note/get note ];
|
||||
:local Signature [ $EitherOr [ $NotificationEMailSignature ] [ /system/note/get note ] ];
|
||||
:set ($EmailQueue->[ :len $EmailQueue ]) {
|
||||
to=$To; cc=$Cc;
|
||||
subject=[ $NotificationEMailSubject ($Notification->"subject") ];
|
||||
|
||||
Reference in New Issue
Block a user