Method EraseEmailAsync
- Namespace
- MailFathom.Application.Folders.Local
- Assembly
- MailFathom.Application.dll
EraseEmailAsync(IPersistenceSession, MailAccountId, StoredEmailId, CancellationToken)
Erases one stored message of the account through the cascade a stored message's erasure runs.
Task<MailFolderAlias?> EraseEmailAsync(IPersistenceSession session, MailAccountId account, StoredEmailId email, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the erasure commits in.
accountMailAccountIdThe account the message belongs to.
emailStoredEmailIdThe message.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<MailFolderAlias?>
The alias of the folder binding the message was stored under, or null where the account holds no such message.
Remarks
A message already gone is not an error, because the act that erases it may be replaying one that already did.