• Gets the session object from the JMAP server

    Parameters

    • Optional token: string

      Optional Fastmail API token to use for authentication

    • Optional hostname: string

      Optional Fastmail API hostname to use for authentication; defaults to https://api.fastmail.com

    Returns Promise<any>

    Throws

    InvalidCredentialsError if no username or password is provided