How victor-sm/craft-mailer works
Main Components
a. Core Plugin Components:
• Controllers Layer (Mailer_FormController)
• Models Layer (Form, Export, Log, Recipients models)
• Services Layer (Mailer_MainService)
• Records Layer (Log records for persistence)
• Tasks Layer (MailerTask for batch processing)
b. External Systems:
• Craft CMS Core
• Email Server/Service
• Database (for logging)
• File System (for CSV exports)
Component Relationships
• User Interface → Controllers (HTTP requests)
• Controllers → Services (business logic flow)
• Services → Models (data handling)
• Services → Tasks (batch email processing)
• Models → Records (database persistence)
• Tasks → Email Server (email delivery)
Data Flow Indicators
Primary flows:
• Email Configuration Flow:
• UI → Controller → Service → Models
• Email Sending Flow:
• Service → Task → Email Server
• Logging Flow:
• Service → Log Model → Log Record → Database
Integration Points
Connections:
• Craft CMS Integration
• Email Service Integration
• User Group System Integration
• Template System Integration
The template processing system
This structure will provide a clear understanding of how the plugin integrates with Craft CMS while maintaining its own distinct functionality for email management and delivery.