Developer Guide
Extending AcelleMail Source Code
Project Structure
AcelleMail is built on Laravel. Key directories:
app/
Models/ — Eloquent models (MailList, Campaign, Subscriber...)
Http/
Controllers/Api/ — REST API controllers
Controllers/Web/ — Web UI controllers
Jobs/ — Queue jobs (SendEmail, TrackOpen...)
Services/ — Business logic (MailService, SegmentService...)
resources/views/ — Blade templates
routes/
api.php — API routes
web.php — Web routes
Adding a Custom Field to Subscribers
- Create a migration:
php artisan make:migration add_phone_to_subscribers - Add the column and update
$fillableinapp/Models/Subscriber.php - Expose via API by editing
SubscriberController@store
Custom Mail Provider
Implement the MailClientInterface in a new class under app/Services/MailProviders/, then register it in config/mail_providers.php. The interface requires send(), verify(), and getQuota() methods.
Hooks and Events
AcelleMail dispatches Laravel events you can listen to without modifying core files:
// In a Service Provider boot()
Event::listen(\App\Events\CampaignSent::class, function($event) {
// Custom post-send logic
Log::info('Campaign sent: ' . $event->campaign->name);
});
Upgrade Safety
Keep customisations in separate Service Providers and avoid editing vendor or core model files directly. Use extends when possible. Document every change so upgrades are predictable.