global-functions: $FlushEmailQueue: delay if "in-progress"...

Something else is sending a mail... Let's wait and hope the status is
not confused.
This commit is contained in:
Christian Hesse 2022-03-01 12:47:23 +01:00
parent c35485454c
commit c9b6cee83f

View file

@ -354,6 +354,7 @@
:foreach Id,Message in=$EmailQueue do={
:if ([ :typeof $Message ] = "array" ) do={
:local Attach [ $EitherOr ($Message->"attach") "" ];
:while ([ / tool e-mail get last-status ] = "in-progress") do={ :delay 1s; }
/ tool e-mail send to=($Message->"to") cc=($Message->"cc") subject=($Message->"subject") \
body=($Message->"body") file=$Attach;
:local Wait true;