Implements

Constructors

Methods

  • Delete a custom email folder for the email address identified by emailAddressId. When a custom folder is deleted, any messages in the folder will be moved to TRASH.

    Parameters

    Returns Promise<undefined | EmailFolder>

    The deleted folder, or undefined if folder was not found.

  • Delete a single email message identified by id.

    Parameters

    • id: string

      The identifier of the email message to be deleted.

    Returns Promise<undefined | DeleteEmailMessageSuccessResult>

    Result object containing the identifier of the email message that was deleted, or undefined if the email message could not be deleted.

    Throws

    NotRegisteredError

    Throws

    LimitExceededError

    Throws

    ServiceError

  • Export the cryptographic keys to a key archive.

    Returns Promise<ArrayBuffer>

    Key archive data.

  • Get a list of all of the email domains for which end-to-end encryption is supported.

    Parameters

    • cachePolicy: CachePolicy

      Determines how the configured email domains will be fetched. Default usage is remoteOnly.

    Returns Promise<string[]>

    A list of all configured domains.

    Throws

    NotRegisteredError

    Throws

    ServiceError

  • Get an email address identified by id.

    Parameters

    Returns Promise<undefined | EmailAddress>

    The email address identified by id or undefined if the email address cannot be found.

  • Get an email message identified by id.

    Parameters

    Returns Promise<undefined | EmailMessage>

    The email message identified by id or undefined if the email message cannot be found.

  • Parameters

    Returns Promise<undefined | EmailMessageRfc822Data>

    The data associated with the email message or undefined if the email message cannot be found.

    Deprecated

    Use getEmailMessageWithBody instead to retrieve the body and attachment data.

    Get the RFC 6854 (supersedes RFC 822) data of the email message.

  • Get a list of all of the email domains on which emails may be provisioned.

    Parameters

    • cachePolicy: CachePolicy

      Determines how the supported email domains will be fetched. Default usage is remoteOnly.

    Returns Promise<string[]>

    A list of supported domains.

    Throws

    NotRegisteredError

    Throws

    ServiceError

  • Imports cryptographic keys from a key archive.

    Parameters

    • archiveData: ArrayBuffer

      Key archive data to import the keys from.

    Returns Promise<void>

  • Lists the metadata of all draft email messages for the specified email address identifier.

    Parameters

    • emailAddressId: string

      The identifier of the email address associated with the draft email messages.

    Returns Promise<DraftEmailMessageMetadata[]>

    An array of draft email message metadata or an empty array if no matching draft email messages can be found.

  • Lists the metadata and content of all draft email messages for the user.

    Returns Promise<DraftEmailMessage[]>

    An array of draft email messages or an empty array if no matching draft email messages can be found.

  • Lists the metadata and content of all draft messages for the specified email address identifier.

    Parameters

    • emailAddressId: string

      The identifier of the email address associated with the draft email messages.

    Returns Promise<DraftEmailMessage[]>

    An array of draft email messages or an empty array if no matching draft email messages can be found.

  • Get a list of email folders associated with the email address identified by emailAddressId.

    Parameters

    Returns Promise<ListOutput<EmailFolder>>

    An array of email folders or an empty array if no matching email folders can be found.

  • Get a list of public information objects associated with the provided email addresses.

    Results can only be retrieved in batches of 50. Anything greater will throw a LimitExceededError.

    Parameters

    Returns Promise<EmailAddressPublicInfo[]>

    An array of public info objects, or an empty array if email addresses or their public keys cannot be found.

    Throws

    LimitExceededError

  • Provision an email address.

    Parameters

    • input: ProvisionEmailAddressInput

      Parameters used to provision an email address. Email addresses must meet the following criteria:

      • Total length (including both local part and domain) must not exceed 256 characters.
      • Local part must not exceed more than 64 characters.
      • Input domain parts (domain separated by .) must not exceed 63 characters.
      • Address must match standard email address pattern: ^[a-zA-Z0-9](\.?[-_a-zA-Z0-9])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$.
      • Domain must be a registered domain retrieved from SudoEmailClient.getSupportedEmailDomains.

    Returns Promise<EmailAddress>

    The provisioned email address.

    Throws

    InvalidAddressError

    Throws

    InvalidKeyRingIdError

    Throws

    AddressUnavailableError

    Throws

    NotRegisteredError

    Throws

    InvalidTokenError

    Throws

    InsufficientEntitlementsError

    Throws

    ServiceError

  • Removes any cached data maintained by this client.

    Returns Promise<void>

  • Subscribe to email message events.

    Parameters

    • subscriptionId: string

      unique identifier to differentiate subscriptions; note that specifying a duplicate subscription id will replace the previous subscription.

    • subscriber: EmailMessageSubscriber

      implementation of callback to be invoked when email message event occurs

    Returns Promise<void>

  • Unsubscribe from email message events.

    Parameters

    • subscriptionId: string

      unique identifier to differentiate subscription

    Returns void

  • Update the metadata of an email address.

    Parameters

    Returns Promise<string>

    The id of the updated email address.

    Throws

    NotRegisteredError

    Throws

    ServiceError