diff --git a/doc/mod/notification-email.md b/doc/mod/notification-email.md index e4ceda21..8dc2ecf1 100644 --- a/doc/mod/notification-email.md +++ b/doc/mod/notification-email.md @@ -64,6 +64,11 @@ Place this before you call them: :global SendEMail; :global SendNotification; +In case there is a situation when the queue needs to be purged there is a +function available: + + $PurgeEMailQueue; + See also -------- diff --git a/mod/notification-email.rsc b/mod/notification-email.rsc index 7be3abe0..e266201b 100644 --- a/mod/notification-email.rsc +++ b/mod/notification-email.rsc @@ -10,6 +10,7 @@ :global LogForwardFilterLogForwarding; :global NotificationEMailSubject; :global NotificationFunctions; +:global PurgeEMailQueue; :global QuotedPrintable; :global SendEMail; :global SendEMail2; @@ -156,6 +157,14 @@ } } +# purge the e-mail queue +:set PurgeEMailQueue do={ + :global EmailQueue; + + /system/scheduler/remove [ find where name="\$FlushEmailQueue" ]; + :set EmailQueue; +} + # convert string to quoted-printable :global QuotedPrintable do={ :local Input [ :tostr $1 ];