My garden has been planted and the days are getting warmer. Next task, cleaning up. Mailsac won’t help you organize you garage or avoid the accumulation of clutter. But it can help you get rid of old emails.
The Delete All Messages in a Domain Endpoint released on March 23, 2021 can help you keep your private domain storage under the storage limit. It’s useful for deleting all messages before running integration tests.
This post will detail the different methods of bulk message deletion.
Cleanup a Custom Domain
All messages in a custom domain can irrevocably be deleted.
From the Dashboard select Custom Domains → Select Domain to Mange → Advanced tab → Irreversibly Delete Email
The REST API has a commensurate endpoint for deleting all messages in a domain. It can be invoked by calling an HTTP POST https://mailsac.com/api/domains/{domain}/delete-all-domain-mail
, where {domain}
is the custom domain.
Cleanup a Private Inbox
All messages in a Private Inbox can be deleted from the website or the REST API. Both methods will not delete starred messages.
From the From the Dashboard select Manage Email Addresses → Select Email Address → Purge Inbox
Messages in a Private Inbox can be deleted using the endpoint for deleting messages in a private inbox. The endpoint can be used with the HTTP DELETE
method on https://mailsac.com/api/addresses/{email}/messages
where {email}
is the private email address.
Deleting Individual Messages
Individual messages can be deleted from both private and non-private inboxes.
From the From the Dashboard enter an inbox in the inbox viewer form and select Check The Mail!. From the Inbox, Click the message → Select Delete → Permanently Delete
Individual messages can be deleted using the delete message REST API. The endpoint can be called using an HTTP DELETE
with the URL https://mailsac.com/api/addresses/{email}/messages/{messageId}
. The {email}
parameter is the email address and the {messageId}
is identifier for the message to be deleted. The messageId
can be found by using the list messages in an inbox REST API endpoint.