Interface for a email service.

interface EmailServiceInterface {
    attachTo: (app: ZibriApplication) => void;
    queue: (data: QueueEmailData) => Promise<void>;
    sendQueuedEmails: () => Promise<boolean>;
}

Implemented by

Properties

attachTo: (app: ZibriApplication) => void

Attaches the service to the Zibri application.

queue: (data: QueueEmailData) => Promise<void>

Queues a new email.

sendQueuedEmails: () => Promise<boolean>

Sends some of the queued emails.

Type declaration

    • (): Promise<boolean>
    • Returns Promise<boolean>

      True when there are still resources available to send new emails, false otherwise.