diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-08 12:45:38 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 20:37:57 +0100 |
commit | 9b8d3f7970dbdddeb2a51db06f8358d8a195526d (patch) | |
tree | 6a126779b1120859cefed45321a1caa521294b81 /mod/notification-email.rsc | |
parent | bdcf43a6f6644d0f88a1d38e4b28e90566d77d23 (diff) |
mod/notification-email: switch to $LogPrint
Diffstat (limited to 'mod/notification-email.rsc')
-rw-r--r-- | mod/notification-email.rsc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/notification-email.rsc b/mod/notification-email.rsc index 88bfdac..78192f3 100644 --- a/mod/notification-email.rsc +++ b/mod/notification-email.rsc @@ -24,7 +24,7 @@ :global EitherOr; :global IsDNSResolving; :global IsTimeSync; - :global LogPrintExit2; + :global LogPrint; :local AllDone true; :local QueueLen [ :len $EmailQueue ]; @@ -35,23 +35,23 @@ } :if ([ /tool/e-mail/get last-status ] = "in-progress") do={ - $LogPrintExit2 debug $0 ("Sending mail is currently in progress, not flushing.") false; + $LogPrint debug $0 ("Sending mail is currently in progress, not flushing."); :return false; } :if ([ $IsTimeSync ] = false) do={ - $LogPrintExit2 debug $0 ("Time is not synced, not flushing.") false; + $LogPrint debug $0 ("Time is not synced, not flushing."); :return false; } :local EMailSettings [ /tool/e-mail/get ]; :if ([ :typeof [ :toip ($EMailSettings->"server") ] ] != "ip" && [ $IsDNSResolving ] = false) do={ - $LogPrintExit2 debug $0 ("Server address is a DNS name and resolving fails, not flushing.") false; + $LogPrint debug $0 ("Server address is a DNS name and resolving fails, not flushing."); :return false; } :if ([ :len $Scheduler ] > 0 && $QueueLen = 0) do={ - $LogPrintExit2 warning $0 ("Flushing E-Mail messages from scheduler, but queue is empty.") false; + $LogPrint warning $0 ("Flushing E-Mail messages from scheduler, but queue is empty."); } /system/scheduler/set interval=([ $EitherOr $QueueLen 1 ] . "m") comment="Sending..." $Scheduler; @@ -64,7 +64,7 @@ :if ([ :len [ /file/find where name=$File ] ] = 1) do={ :set Attach ($Attach, $File); } else={ - $LogPrintExit2 warning $0 ("File '" . $File . "' does not exist, can not attach.") false; + $LogPrint warning $0 ("File '" . $File . "' does not exist, can not attach."); } } /tool/e-mail/send to=($Message->"to") cc=($Message->"cc") subject=($Message->"subject") \ |