feat(storage): add comprehensive tests for StorageManager with memory, filesystem, and custom function backends
feat(email): implement EmailSendJob class for robust email delivery with retry logic and MX record resolution feat(mail): restructure mail module exports for simplified access to core and delivery functionalities
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* SMTP command sending and response parsing
|
||||
*/
|
||||
|
||||
import * as plugins from '../../../plugins.ts';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { SMTP_COMMANDS, SMTP_CODES, LINE_ENDINGS } from './constants.ts';
|
||||
import type {
|
||||
ISmtpConnection,
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
} from './utils/helpers.ts';
|
||||
import { logCommand, logDebug } from './utils/logging.ts';
|
||||
|
||||
export class CommandHandler extends plugins.EventEmitter {
|
||||
export class CommandHandler extends EventEmitter {
|
||||
private options: ISmtpClientOptions;
|
||||
private responseBuffer: string = '';
|
||||
private pendingCommand: { resolve: Function; reject: Function; command: string } | null = null;
|
||||
|
||||
@@ -3,18 +3,20 @@
|
||||
* Connection pooling and lifecycle management
|
||||
*/
|
||||
|
||||
import * as plugins from '../../../plugins.ts';
|
||||
import * as net from 'node:net';
|
||||
import * as tls from 'node:tls';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { DEFAULTS, CONNECTION_STATES } from './constants.ts';
|
||||
import type {
|
||||
ISmtpClientOptions,
|
||||
ISmtpConnection,
|
||||
import type {
|
||||
ISmtpClientOptions,
|
||||
ISmtpConnection,
|
||||
IConnectionPoolStatus,
|
||||
ConnectionState
|
||||
ConnectionState
|
||||
} from './interfaces.ts';
|
||||
import { logConnection, logDebug } from './utils/logging.ts';
|
||||
import { generateConnectionId } from './utils/helpers.ts';
|
||||
|
||||
export class ConnectionManager extends plugins.EventEmitter {
|
||||
export class ConnectionManager extends EventEmitter {
|
||||
private options: ISmtpClientOptions;
|
||||
private connections: Map<string, ISmtpConnection> = new Map();
|
||||
private pendingConnections: Set<string> = new Set();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Main client class with delegation to handlers
|
||||
*/
|
||||
|
||||
import * as plugins from '../../../plugins.ts';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import type { Email } from '../../core/classes.email.ts';
|
||||
import type {
|
||||
ISmtpClientOptions,
|
||||
@@ -30,7 +30,7 @@ interface ISmtpClientDependencies {
|
||||
errorHandler: SmtpErrorHandler;
|
||||
}
|
||||
|
||||
export class SmtpClient extends plugins.EventEmitter {
|
||||
export class SmtpClient extends EventEmitter {
|
||||
private options: ISmtpClientOptions;
|
||||
private connectionManager: ConnectionManager;
|
||||
private commandHandler: CommandHandler;
|
||||
|
||||
Reference in New Issue
Block a user