/** * SMTP Client Command Handler * SMTP command sending and response parsing */ import { EventEmitter } from 'node:events'; import type { ISmtpConnection, ISmtpResponse, ISmtpClientOptions, ISmtpCapabilities } from './interfaces.js'; export declare class CommandHandler extends EventEmitter { private options; private responseBuffer; private pendingCommand; private commandTimeout; constructor(options: ISmtpClientOptions); /** * Send EHLO command and parse capabilities */ sendEhlo(connection: ISmtpConnection, domain?: string): Promise; /** * Send MAIL FROM command */ sendMailFrom(connection: ISmtpConnection, fromAddress: string): Promise; /** * Send RCPT TO command */ sendRcptTo(connection: ISmtpConnection, toAddress: string): Promise; /** * Send DATA command */ sendData(connection: ISmtpConnection): Promise; /** * Send email data content */ sendDataContent(connection: ISmtpConnection, emailData: string): Promise; /** * Send RSET command */ sendRset(connection: ISmtpConnection): Promise; /** * Send NOOP command */ sendNoop(connection: ISmtpConnection): Promise; /** * Send QUIT command */ sendQuit(connection: ISmtpConnection): Promise; /** * Send STARTTLS command */ sendStartTls(connection: ISmtpConnection): Promise; /** * Send AUTH command */ sendAuth(connection: ISmtpConnection, method: string, credentials?: string): Promise; /** * Send a generic SMTP command */ sendCommand(connection: ISmtpConnection, command: string): Promise; /** * Send raw data without command formatting */ sendRawData(connection: ISmtpConnection, data: string): Promise; /** * Wait for server greeting */ waitForGreeting(connection: ISmtpConnection): Promise; private handleIncomingData; private isCompleteResponse; }