/// import { EventEmitter } from "events"; import { Readable } from "stream"; import { Transport, TransportOptions } from "../.."; import * as shared from "../shared"; import Mail = require("../mailer"); import MailMessage = require("../mailer/mail-message"); import MimeNode = require("../mime-node"); declare namespace StreamTransport { type MailOptions = Mail.Options; interface Options extends MailOptions, TransportOptions { streamTransport: true; /** if true, then returns the message as a Buffer object instead of a stream */ buffer?: boolean | undefined; /** either ‘windows’ or ‘unix’ (default). Forces all newlines in the output to either use Windows syntax or Unix syntax */ newline?: string | undefined; } interface SentMessageInfo { /** an envelope object {from:‘address’, to:[‘address’]} */ envelope: MimeNode.Envelope; /** the Message-ID header value */ messageId: string; /** either stream (default) of buffer depending on the options */ message: Buffer | Readable; accepted: Array; rejected: Array; pending: Array; response: string; } } declare class StreamTransport implements Transport { options: StreamTransport.Options; logger: shared.Logger; mailer: Mail; name: string; version: string; winbreak: boolean; constructor(options: StreamTransport.Options); /** Compiles a mailcomposer message and forwards it to handler that sends it */ send( mail: MailMessage, callback: (err: Error | null, info: StreamTransport.SentMessageInfo) => void, ): void; } export = StreamTransport;