Type Parameters

Hierarchy

  • EmailRouter

Implements

Constructors

Accessors

Methods

Constructors

Properties

config: EmailRouterConfig = ...
rules: EmailRouteRule[] = []

Accessors

Methods

  • Matches the given email message against the defined rules and returns the first matching rule.

    Parameters

    Returns Promise<null | EmailRouteRule>

    The first matching rule or null if no rule matches the message.

  • Parameters

    • ctx: In
    • Optional next: ((c) => Promise<void>)
        • (c): Promise<void>
        • Parameters

          • c: In

          Returns Promise<void>

    Returns Promise<void>

  • Processes the email message and returns the result of the matching route handle.

    Parameters

    • ctx: In

      The email context object.

    • Optional next: ((c) => Promise<void>)

      The next middleware function.

        • (c): Promise<void>
        • Parameters

          • c: In

          Returns Promise<void>

    Returns Promise<EmailRouteHandleResult>

    An object containing the matched route handle or null if no match was found.

Generated using TypeDoc