Skip to content

Exceptions ​

All failures extend the sealed class MailException in dev.reapermaga.mailkt.model. Messages never contain credentials, message content, addresses or provider-supplied text.

TypePropertiesThrown when
AuthenticationRequiredCredentials rejected or silent refresh impossible.
AuthorizationFailedreason: AuthorizationFailureHosted-flow validation failed.
ConnectionFailedrecovery: RecoveryReasonConnecting or transport failed.
MailboxClosedOperation on a closed or closing mailbox.
NotConnectedstate: MailboxStateMailbox is reconnecting or failed.
FolderNotFoundfolder: FolderPathFolder missing or not selectable.
MessageUnavailablelocation: MessageLocationMessage or part expunged or gone.
IntegrityViolationkind: IntegrityKindUIDVALIDITY or a part changed between selection and download.
LimitExceededlimitBytes: LongA byte limit was exceeded.
MalformedMessageA message could not be parsed or built.
InvalidCheckpointUnsupported version, or a checkpoint of another mailbox or folder.
OutboxUnavailableNo SMTP configured for this mailbox.
DuplicateMailboxid: MailboxIdA live mailbox with the same id is registered.
UnexpectedUnclassified failure; cause holds the original.

AuthorizationFailure ​

ValueMeaning
UNKNOWN_STATEMissing, unknown or already consumed state.
EXPIREDPending session older than ten minutes.
REDIRECT_NOT_ALLOWEDRedirect URI not in the allowlist.
PROVIDER_ERRORProvider returned an error or no code.
EXCHANGE_FAILEDCode exchange failed.
WRONG_ACCOUNTAuthenticated account differs from the expected email.
STORE_FAILEDAuthorizationSessionStore threw.

IntegrityKind ​

ValueMeaning
UID_VALIDITY_CHANGEDThe folder's UIDVALIDITY changed; all UIDs are invalid.
MESSAGE_EXPUNGEDThe message disappeared during an operation.
PART_CHANGEDThe MIME part differs from the selected descriptor.
MEMBERSHIP_CHANGEDA frozen scan's membership became invalid.

Released under the MIT License.