Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "node_modules/@types/nodemailer/lib/shared.d"

Index

Type aliases

LoggerLevel

LoggerLevel: "trace" | "debug" | "info" | "warn" | "error" | "fatal"

Functions

assign

  • assign(target: object, ...sources: object[]): object
  • Copies properties from source objects to target objects

    Parameters

    • target: object
    • Rest ...sources: object[]

    Returns object

callbackPromise

  • callbackPromise(resolve: function, reject: function): function
  • Wrapper for creating a callback than either resolves or rejects a promise based on input

    Parameters

    • resolve: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • reject: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns function

      • (): void
      • Returns void

encodeXText

  • encodeXText(str: string): string
  • Parameters

    • str: string

    Returns string

getLogger

  • getLogger(options?: undefined | object, defaults?: undefined | object): Logger
  • Returns a bunyan-compatible logger interface. Uses either provided logger or creates a default console logger

    Parameters

    • Optional options: undefined | object
    • Optional defaults: undefined | object

    Returns Logger

parseConnectionUrl

  • parseConnectionUrl(url: string): Options
  • Parses connection url to a structured configuration object

    Parameters

    • url: string

    Returns Options

resolveContent

  • resolveContent(data: object | any[], key: string | number, callback: function): void
  • resolveContent(data: object | any[], key: string | number): Promise<Buffer | string>
  • Resolves a String or a Buffer value for content value. Useful if the value is a Stream or a file or an URL. If the value is a Stream, overwrites the stream object with the resolved value (you can't stream a value twice).

    This is useful when you want to create a plugin that needs a content value, for example the html or text value as a String or a Buffer but not as a file path or an URL.

    Parameters

    • data: object | any[]
    • key: string | number
    • callback: function
        • (err: Error | null, value: Buffer | string): void
        • Parameters

          • err: Error | null
          • value: Buffer | string

          Returns void

    Returns void

  • Parameters

    • data: object | any[]
    • key: string | number

    Returns Promise<Buffer | string>

Generated using TypeDoc