Could this be something like purgeOutbox(int accountId) including all needed handling checking?

This is anyways filtering outbox.