[GH-ISSUE #164] Feature request: delete multiple emails at once #107

Closed
opened 2026-03-15 12:35:16 +03:00 by kerem · 10 comments
Owner

Originally created by @asaah18 on GitHub (Sep 13, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/164

I think it would be great to be able to select and delete multiple emails at once. Or delete all emails except the one that has a tag

Originally created by @asaah18 on GitHub (Sep 13, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/164 I think it would be great to be able to select and delete multiple emails at once. Or delete all emails except the one that has a tag
kerem 2026-03-15 12:35:16 +03:00
Author
Owner

@axllent commented on GitHub (Sep 13, 2023):

You can already select multiple messages at a time using Ctrl-click, or Shift-click - and then clicking the delete button :)

<!-- gh-comment-id:1717349952 --> @axllent commented on GitHub (Sep 13, 2023): You can already select multiple messages at a time using Ctrl-click, or Shift-click - and then clicking the delete button :)
Author
Owner

@asaah18 commented on GitHub (Sep 13, 2023):

I didn't notice that I can do that, thank you.
But what about deleting all messages except the ones with tags?

<!-- gh-comment-id:1717571277 --> @asaah18 commented on GitHub (Sep 13, 2023): I didn't notice that I can do that, thank you. But what about deleting all messages except the ones with tags?
Author
Owner

@mbomb007 commented on GitHub (Sep 13, 2023):

I didn't notice that I can do that, thank you. But what about deleting all messages except the ones with tags?

I don't know of any email clients that have such functionality. Why is something like this so desirable, when this is a tool mostly for development purposes? The closest functionality that could be justified would be a filter or search for untagged emails. Then you could manually select and delete them all.

<!-- gh-comment-id:1717745709 --> @mbomb007 commented on GitHub (Sep 13, 2023): > I didn't notice that I can do that, thank you. But what about deleting all messages except the ones with tags? I don't know of any email clients that have such functionality. Why is something like this so desirable, when this is a tool mostly for development purposes? The closest functionality that could be justified would be a filter or search for untagged emails. Then you could manually select and delete them all.
Author
Owner

@axllent commented on GitHub (Sep 14, 2023):

I will look into a is:untagged search option at some point, but this is currently not possible. You can definitely exclude messages containing tags in a search (eg !tag:mytag), but there is currently no option to filter by messages containing no tag.

<!-- gh-comment-id:1718800588 --> @axllent commented on GitHub (Sep 14, 2023): I will look into a `is:untagged` search option at some point, but this is currently not possible. You can definitely exclude messages containing tags in a search (eg `!tag:mytag`), but there is currently no option to filter by messages containing no tag.
Author
Owner

@asaah18 commented on GitHub (Sep 14, 2023):

don't know of any email clients that have such functionality. Why is something like this so desirable, when this is a tool mostly for development purposes? The closest functionality that could be justified would be a filter or search for untagged emails. Then you could manually select and delete them all.

In my case, testing emails start to clutter and want delete all of the cluttered emails but keep an email or two that are used as a reference -as I am trying to recreate the email html that have multiple cases- .

<!-- gh-comment-id:1720177177 --> @asaah18 commented on GitHub (Sep 14, 2023): > don't know of any email clients that have such functionality. Why is something like this so desirable, when this is a tool mostly for development purposes? The closest functionality that could be justified would be a filter or search for untagged emails. Then you could manually select and delete them all. In my case, testing emails start to clutter and want delete all of the cluttered emails but keep an email or two that are used as a reference -as I am trying to recreate the email html that have multiple cases- .
Author
Owner

@mbomb007 commented on GitHub (Sep 14, 2023):

Similar functionality might be how text messages can be "locked" so that they won't be deleted when using Delete All.

<!-- gh-comment-id:1720179850 --> @mbomb007 commented on GitHub (Sep 14, 2023): Similar functionality might be how text messages can be "locked" so that they won't be deleted when using Delete All.
Author
Owner

@axllent commented on GitHub (Sep 15, 2023):

I don't think (at this stage) locking messages is a good move, as this will potentially all sorts of confusion and complications, and I believe that such functionality is becoming far too personal / specific-user-focused. There are potentially already existing ways to handle this, such as to add a tag (eg: keep) to the messages you want to keep. If you do decide to manually prune, search to !tag:keep which will find all messages that do not have the "keep" tag, and delete from there.

I have already (in my local development branch, not yet in github) added the is:tagged search option (or !is:tagged if you wanted those without any tags) which is the original request here. I believe that this, as well as the proposed "keep solution" will achieve both requests here?

Mailpit does not yet have a "delete all" for a filtered view, only "delete 50" (ie: those displayed on-screen). I am in the middle of a complete frontend rewrite (relating to #156) which is actually taking far longer than I had initially though, mainly because I'm breaking up all the frontend components into logical and manageable parts. The API is currently the same as before (with the addition of the is:tagged search), so I'm going to have to consider how I could handle the "delete all" for a filtered view (including those not displayed on the current page).

<!-- gh-comment-id:1720663247 --> @axllent commented on GitHub (Sep 15, 2023): I don't think (at this stage) locking messages is a good move, as this will potentially all sorts of confusion and complications, and I believe that such functionality is becoming far too personal / specific-user-focused. There are potentially already existing ways to handle this, such as to add a tag (eg: `keep`) to the messages you want to keep. If you do decide to manually prune, search to `!tag:keep` which will find all messages that do not have the "keep" tag, and delete from there. I have already (in my local development branch, not yet in github) added the `is:tagged` search option (or `!is:tagged` if you wanted those without any tags) which is the original request here. I believe that this, as well as the proposed "`keep` solution" will achieve both requests here? Mailpit does not yet have a "delete all" for a filtered view, only "delete 50" (ie: those displayed on-screen). I am in the middle of a complete frontend rewrite (relating to #156) which is actually taking far longer than I had initially though, mainly because I'm breaking up all the frontend components into logical and manageable parts. The API is currently the same as before (with the addition of the `is:tagged` search), so I'm going to have to consider how I could handle the "delete all" for a filtered view (including those not displayed on the current page).
Author
Owner

@asaah18 commented on GitHub (Sep 15, 2023):

It's all good as long as there's a way to delete all emails except certain ones somehow

<!-- gh-comment-id:1721573604 --> @asaah18 commented on GitHub (Sep 15, 2023): It's all good as long as there's a way to delete all emails except certain ones somehow
Author
Owner

@axllent commented on GitHub (Sep 22, 2023):

I have just released v1.9.0 which has changes relating to this issue. The web UI now provides the ability to delete all messages matching a search, so you could for instance search for all messages not tagged (!is:tagged) or for all messages not tagged with your "to keep" tag (whatever that may be) and delete.

<!-- gh-comment-id:1730795998 --> @axllent commented on GitHub (Sep 22, 2023): I have just released [v1.9.0](https://github.com/axllent/mailpit/releases/tag/v1.9.0) which has changes relating to this issue. The web UI now provides the ability to delete all messages matching a search, so you could for instance search for all messages not tagged (`!is:tagged`) or for all messages not tagged with your "to keep" tag (whatever that may be) and delete.
Author
Owner

@axllent commented on GitHub (Sep 27, 2023):

I'm closing this as complete, but feel free to reopen if you have issues.

<!-- gh-comment-id:1736657079 --> @axllent commented on GitHub (Sep 27, 2023): I'm closing this as complete, but feel free to reopen if you have issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mailpit#107
No description provided.