Self-hosted email marketing with full source code. Pay once, own forever. Get AcelleMail — $74 →

Extending AcelleMail Source Code

Understand AcelleMail's Laravel architecture and add custom features without breaking core functionality.

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

  1. Create a migration: php artisan make:migration add_phone_to_subscribers
  2. Add the column and update $fillable in app/Models/Subscriber.php
  3. 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.

More in Developer Guide