mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
mod/notification-email: handle new property name...
... which changed in RouterOS 7.12rc1.
This commit is contained in:
@ -42,7 +42,8 @@
|
|||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :typeof [ :toip [ /tool/e-mail/get address ] ] ] != "ip" && [ $IsDNSResolving ] = false) do={
|
:local EMailSettings [ /tool/e-mail/get ];
|
||||||
|
:if ([ :typeof [ :toip [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] ] ] != "ip" && [ $IsDNSResolving ] = false) do={
|
||||||
$LogPrintExit2 debug $0 ("Server address is a DNS name and resolving fails, not flushing.") false;
|
$LogPrintExit2 debug $0 ("Server address is a DNS name and resolving fails, not flushing.") false;
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
@ -136,7 +137,7 @@
|
|||||||
:local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ];
|
:local Cc [ $EitherOr ($EmailGeneralCcOverride->($Notification->"origin")) $EmailGeneralCc ];
|
||||||
|
|
||||||
:local EMailSettings [ /tool/e-mail/get ];
|
:local EMailSettings [ /tool/e-mail/get ];
|
||||||
:if ([ :len $To ] = 0 || ($EMailSettings->"address") = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={
|
:if ([ :len $To ] = 0 || [ $EitherOr ($EMailSettings->"server") ($EMailSettings->"address") ] = "0.0.0.0" || ($EMailSettings->"from") = "<>") do={
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user