mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-31 16:24:30 +02: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:
parent
9fb596135e
commit
d3611cebbd
1 changed files with 2 additions and 1 deletions
|
@ -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") ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue