fix(readme): Update readme with consolidated email system improvements and modular directory structure
Clarify that the platform now organizes email functionality into distinct directories (mail/core, mail/delivery, mail/routing, mail/security, mail/services) and update the diagram and key features list accordingly. Adjust code examples to reflect explicit module imports and the use of SzPlatformService.
This commit is contained in:
parent
fe2069c48e
commit
970c0d5c60
10
changelog.md
10
changelog.md
@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-05-08 - 2.8.1 - fix(readme)
|
||||
Update readme with consolidated email system improvements and modular directory structure
|
||||
|
||||
Clarify that the platform now organizes email functionality into distinct directories (mail/core, mail/delivery, mail/routing, mail/security, mail/services) and update the diagram and key features list accordingly. Adjust code examples to reflect explicit module imports and the use of SzPlatformService.
|
||||
|
||||
- Changed description of consolidated email configuration to include 'streamlined directory structure'.
|
||||
- Updated mermaid diagram to show 'Mail System Structure' with separate components for core, delivery, routing, security, and services.
|
||||
- Modified key features list to document modular directory structure.
|
||||
- Revised code sample imports to use explicit paths and SzPlatformService.
|
||||
|
||||
## 2025-05-08 - 2.8.0 - feat(docs)
|
||||
Update documentation to include consolidated email handling and pattern‑based routing details
|
||||
|
||||
|
33
readme.md
33
readme.md
@ -106,7 +106,7 @@ sendLetter();
|
||||
### Mail Transfer Agent (MTA) and Consolidated Email Handling
|
||||
|
||||
The platform includes a robust Mail Transfer Agent (MTA) for enterprise-grade email handling with complete control over the email delivery process.
|
||||
Additionally, the platform now features a consolidated email configuration system with pattern-based routing:
|
||||
Additionally, the platform now features a consolidated email configuration system with pattern-based routing and a streamlined directory structure:
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
@ -123,11 +123,13 @@ graph TD
|
||||
ApiManager[API Manager] --> DcRouter
|
||||
end
|
||||
|
||||
subgraph "MTA Service"
|
||||
MtaMode --> MtaService[MTA Service]
|
||||
MtaService --> EmailSendJob[Email Send Job]
|
||||
MtaService --> DnsManager[DNS Manager]
|
||||
MtaService --> DkimCreator[DKIM Creator]
|
||||
subgraph "Mail System Structure"
|
||||
MailCore[mail/core] --> EmailClasses[Email, TemplateManager, etc.]
|
||||
MailDelivery[mail/delivery] --> MtaService[MTA Service]
|
||||
MailDelivery --> EmailSendJob[Email Send Job]
|
||||
MailRouting[mail/routing] --> DnsManager[DNS Manager]
|
||||
MailSecurity[mail/security] --> AuthClasses[DKIM, SPF, DMARC]
|
||||
MailServices[mail/services] --> ServiceClasses[EmailService, ApiManager]
|
||||
end
|
||||
|
||||
subgraph "External Services"
|
||||
@ -140,6 +142,12 @@ graph TD
|
||||
#### Key Features
|
||||
|
||||
The email handling system provides:
|
||||
- **Modular Directory Structure**: Clean organization with clear separation of concerns:
|
||||
- **mail/core**: Core email models and basic functionality (Email, BounceManager, etc.)
|
||||
- **mail/delivery**: Email delivery mechanisms (MTA, SMTP server, rate limiting)
|
||||
- **mail/routing**: DNS and domain routing capabilities
|
||||
- **mail/security**: Authentication and security features (DKIM, SPF, DMARC)
|
||||
- **mail/services**: High-level services and API interfaces
|
||||
- **Pattern-based Routing**: Route emails based on glob patterns like `*@domain.com` or `*@*.domain.com`
|
||||
- **Multi-Modal Processing**: Handle different email domains with different processing modes:
|
||||
- **Forward Mode**: SMTP forwarding to other servers
|
||||
@ -249,12 +257,19 @@ setupEmailHandling();
|
||||
|
||||
#### Using the MTA Service Directly
|
||||
|
||||
You can still use the MTA service directly for more granular control:
|
||||
You can still use the MTA service directly for more granular control with our new modular directory structure:
|
||||
|
||||
```ts
|
||||
import { MtaService, Email } from '@serve.zone/platformservice';
|
||||
import { SzPlatformService } from '@serve.zone/platformservice';
|
||||
import { MtaService } from '@serve.zone/platformservice/mail/delivery';
|
||||
import { Email } from '@serve.zone/platformservice/mail/core';
|
||||
import { ApiManager } from '@serve.zone/platformservice/mail/services';
|
||||
|
||||
async function useMtaService() {
|
||||
// Initialize platform service
|
||||
const platformService = new SzPlatformService();
|
||||
await platformService.start();
|
||||
|
||||
// Initialize MTA service
|
||||
const mtaService = new MtaService(platformService);
|
||||
await mtaService.start();
|
||||
@ -277,7 +292,7 @@ async function useMtaService() {
|
||||
console.log(`Email status: ${status.status}`);
|
||||
|
||||
// Set up API for external access
|
||||
const apiManager = new ApiManager(mtaService);
|
||||
const apiManager = new ApiManager(platformService.emailService);
|
||||
await apiManager.start(3000);
|
||||
console.log('MTA API running on port 3000');
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/platformservice',
|
||||
version: '2.8.0',
|
||||
version: '2.8.1',
|
||||
description: 'A multifaceted platform service handling mail, SMS, letter delivery, and AI services.'
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/platformservice',
|
||||
version: '2.8.0',
|
||||
version: '2.8.1',
|
||||
description: 'A multifaceted platform service handling mail, SMS, letter delivery, and AI services.'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user