initial
This commit is contained in:
31
ts/mail/delivery/smtpserver/create-server.ts
Normal file
31
ts/mail/delivery/smtpserver/create-server.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* SMTP Server Creation Factory
|
||||
* Provides a simple way to create a complete SMTP server
|
||||
*/
|
||||
|
||||
import { SmtpServer } from './smtp-server.ts';
|
||||
import { SessionManager } from './session-manager.ts';
|
||||
import { ConnectionManager } from './connection-manager.ts';
|
||||
import { CommandHandler } from './command-handler.ts';
|
||||
import { DataHandler } from './data-handler.ts';
|
||||
import { TlsHandler } from './tls-handler.ts';
|
||||
import { SecurityHandler } from './security-handler.ts';
|
||||
import type { ISmtpServerOptions } from './interfaces.ts';
|
||||
import { UnifiedEmailServer } from '../../routing/classes.unified.email.server.ts';
|
||||
|
||||
/**
|
||||
* Create a complete SMTP server with all components
|
||||
* @param emailServer - Email server reference
|
||||
* @param options - SMTP server options
|
||||
* @returns Configured SMTP server instance
|
||||
*/
|
||||
export function createSmtpServer(emailServer: UnifiedEmailServer, options: ISmtpServerOptions): SmtpServer {
|
||||
// First create the SMTP server instance
|
||||
const smtpServer = new SmtpServer({
|
||||
emailServer,
|
||||
options
|
||||
});
|
||||
|
||||
// Return the configured server
|
||||
return smtpServer;
|
||||
}
|
||||
Reference in New Issue
Block a user