How to empty mail queue?

Hi, we currently don’t have a UI for it, see Loading...

For now you can check the scripting API at https://extensions.xwiki.org/xwiki/bin/view/Extension/Mail/MailSenderStorageAPI

Thus, you can put the following in a wiki page (with a user having Admin rights):

{{velocity}}
#if ("$!request.confirm" == '1')
  #set ($mailResult = $services.mail.storage.deleteAll())
  All mails and statuses have been deleted!
#else
  [[Delete all>>||queryString="confirm=1"]]
#end
{{/velocity}}
1 Like