Skip to content

Commit

Permalink
mod/notification-email: introduce $PurgeEmailQueue
Browse files Browse the repository at this point in the history
... to purge the queue and remove the scheduler.
  • Loading branch information
eworm-de committed Aug 6, 2023
1 parent 5b789d2 commit 9a5d55d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doc/mod/notification-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------

Expand Down
9 changes: 9 additions & 0 deletions mod/notification-email.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:global LogForwardFilterLogForwarding;
:global NotificationEMailSubject;
:global NotificationFunctions;
:global PurgeEMailQueue;
:global QuotedPrintable;
:global SendEMail;
:global SendEMail2;
Expand Down Expand Up @@ -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 ];
Expand Down

0 comments on commit 9a5d55d

Please sign in to comment.