From 562c565fcf10fff454e82bd3eb718f6b4cbc5a1d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 23 Sep 2022 15:01:03 +0200 Subject: global-functions: $FlushEmailQueue: do not flush if sending --- global-functions | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 3f7a65e..a93b883 100644 --- a/global-functions +++ b/global-functions @@ -330,6 +330,11 @@ :local AllDone true; :local QueueLen [ :len $EmailQueue ]; + :if ([ /tool/e-mail/get last-status ] = "in-progress") do={ + $LogPrintExit2 debug $0 ("Sending mail in currently in progress, not flushing.") false; + :return false; + } + :if ([ $IsTimeSync ] = false) do={ $LogPrintExit2 debug $0 ("Time is not synced, not flushing.") false; :return false; -- cgit v1.2.3-70-g09d2