import { addressparser } from './address.js'; import type { MessageAttachment, MessageHeaders } from './message.js'; import { Message } from './message.js'; import type { SMTPConnectionOptions } from './connection.js'; import { SMTPConnection } from './connection.js'; export type MessageCallback = (err: U, msg: V) => void; export interface MessageStack { callback: MessageCallback; message: Message; attachment: MessageAttachment; text: string; returnPath?: string; from: string; to: ReturnType; cc: string[]; bcc: string[]; } export declare class SMTPClient { readonly smtp: SMTPConnection; readonly queue: MessageStack[]; protected sending: boolean; protected ready: boolean; protected timer: NodeJS.Timeout | null; constructor(server: Partial); send(msg: T, callback: MessageCallback): void; sendAsync(msg: T): Promise; createMessageStack(message: Message, callback?: MessageCallback): MessageStack; protected _poll(): void; protected _connect(stack: MessageStack): void; protected _canMakeMessage(msg: MessageHeaders): boolean | "" | undefined; protected _containsInlinedHtml(attachment?: MessageAttachment | MessageAttachment[]): boolean; protected _isAttachmentInlinedHtml(attachment?: MessageAttachment): boolean; protected _sendsmtp(stack: MessageStack, next: (msg: MessageStack) => void): (err?: Error | null) => void; protected _sendmail(stack: MessageStack): void; protected _sendrcpt(stack: MessageStack): void; protected _senddata(stack: MessageStack): void; protected _sendmessage(stack: MessageStack): void; protected _senddone(err: Error | null | undefined, stack: MessageStack): void; }