Method IsReadableByTools
- Namespace
- MailFathom.Application.Emails.Mailboxes
- Assembly
- MailFathom.Application.dll
IsReadableByTools(MailAccountId, MailFolderAlias)
Reports whether a tool may read one email, given the mailbox it was stored from.
public bool IsReadableByTools(MailAccountId accountId, MailFolderAlias folderAlias)
Parameters
accountIdMailAccountIdThe account the email was read from.
folderAliasMailFolderAliasThe folder the email was read from.
Returns
Remarks
This is ReadableScope(IReadOnlyList<MailAccountSelector>, IReadOnlyList<MailFolderReference>, JunkMailInclusion) asked about one email instead of about a query, and it exists because two reads reach an email by its identifier and build no scope at all. Both questions are answered from the same two pieces of configuration here, so a folder an operator withheld cannot be readable through one entry point and withheld through another. It is a mapping being asked to admit the folder rather than a list being asked whether it names it, so an email stored under an alias no mapping names is unreadable by the same answer that withholds a mapped folder. A caller that may not read the email is told it was not found rather than refused, for the reason an account this deployment no longer serves is: a refusal would confirm the identifier exists.