Files
smartmta/dist_ts/mail/delivery/smtpclient/utils/validation.d.ts
2026-02-10 15:54:09 +00:00

39 lines
1.1 KiB
TypeScript

/**
* SMTP Client Validation Utilities
* Input validation functions for SMTP client operations
*/
import type { ISmtpClientOptions, ISmtpAuthOptions } from '../interfaces.js';
/**
* Validate email address format
* Supports RFC-compliant addresses including empty return paths for bounces
*/
export declare function validateEmailAddress(email: string): boolean;
/**
* Validate SMTP client options
*/
export declare function validateClientOptions(options: ISmtpClientOptions): string[];
/**
* Validate authentication options
*/
export declare function validateAuthOptions(auth: ISmtpAuthOptions): string[];
/**
* Validate hostname format
*/
export declare function validateHostname(hostname: string): boolean;
/**
* Validate port number
*/
export declare function validatePort(port: number): boolean;
/**
* Sanitize and validate domain name for EHLO
*/
export declare function validateAndSanitizeDomain(domain: string): string;
/**
* Validate recipient list
*/
export declare function validateRecipients(recipients: string | string[]): string[];
/**
* Validate sender address
*/
export declare function validateSender(sender: string): boolean;