Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EmailAccount

Represents a single IMAP mail account.

Hierarchy

  • any
    • EmailAccount

Index

Constructors

constructor

Properties

client

client: any

IMAP connection client.

config

config: any

IMAP account configuration.

id

id: string

ID of this email account.

lastFetch

lastFetch: number

Timestamp of last fetch.

messageIds

messageIds: any

Cache of email message IDs.

retryCount

retryCount: number = 0

Retry count.

timerConnect

timerConnect: any

Timer to force connect regularly.

Methods

connect

  • connect(): any

downloadMessage

  • downloadMessage(rawMessage: any): void
  • Download the specified message and load the related Email Action.

    Parameters

    • rawMessage: any

      The unprocessed, raw message

    Returns void

fetchMessages

  • fetchMessages(since?: Date): void
  • Fetch new unread messages for the specified account.

    Parameters

    • Optional since: Date

      Optional date, if not specified will fetch new / unseen messages.

    Returns void

processEmail

  • processEmail(message: any): Promise<void>
  • Process the specified message against the rules defined on the settings.

    Parameters

    • message: any

      The downloaded email message

    Returns Promise<void>

start

  • start(): void

stop

  • stop(): void

Generated using TypeDoc