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

Something else is sending a mail... Let's wait and hope the status is
not confused.

(cherry picked from commit c9b6cee83f)
This commit is contained in:
Christian Hesse 2022-03-01 12:47:23 +01:00
parent 6336da6bd7
commit c5cc72de0e

View file

@ -358,6 +358,7 @@
:foreach Id,Message in=$EmailQueue do={ :foreach Id,Message in=$EmailQueue do={
:if ([ :typeof $Message ] = "array" ) do={ :if ([ :typeof $Message ] = "array" ) do={
:local Attach [ $EitherOr ($Message->"attach") "" ]; :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") \ / tool e-mail send to=($Message->"to") cc=($Message->"cc") subject=($Message->"subject") \
body=($Message->"body") file=$Attach; body=($Message->"body") file=$Attach;
:local Wait true; :local Wait true;