SendPortal

Self-hosted email marketing with full data control, multi-workspace isolation, and seamless integration with Amazon SES, SendGrid, Mailgun, and more

2.1Kstars
466forks
MIT License
PHP

SendPortal is an open-source, self-hosted email marketing platform built on Laravel and PHP, designed for teams, agencies, and organizations that want complete ownership of their subscriber data and campaign infrastructure. By running on your own servers, it eliminates vendor lock-in, reduces per-email costs to your actual cloud provider rate, and gives you full control over privacy and compliance.

The application wraps SendPortal Core — a dedicated Composer package handling the email engine — into a standalone Laravel app with authentication, multi-workspace management, and a browser-based setup wizard. This dual-deployment model means you can either run it as a self-contained installation or embed the core package into an existing Laravel application without duplicating auth logic.

SendPortal integrates natively with Amazon SES, Postmark, SendGrid, Mailgun, and Mailjet, letting you route campaigns through whichever email service delivers the best cost-performance ratio for your volume. Subscriber lists, campaign scheduling, open/click tracking, and a REST API are all included out of the box, making it a credible self-hosted alternative to Mailchimp and Campaign Monitor at a fraction of the operating cost.

What You Get

  • Subscriber and List Management - Import, segment, and tag subscribers via CSV upload or REST API; build dynamic audiences for targeted campaign delivery.
  • Email Campaign Builder - Create, preview, and schedule campaigns using customizable HTML templates with a built-in WYSIWYG editor and send-time controls.
  • Open and Click Tracking - Monitor opens, clicks, bounces, and unsubscribes per campaign in real time, with per-subscriber delivery logs for granular diagnostics.
  • Multi-Workspace Isolation - Run multiple brands, teams, or clients from a single installation with fully isolated subscriber data, email provider settings, and user roles per workspace.
  • Cloud Email Provider Integration - Native adapters for Amazon SES, Postmark, SendGrid, Mailgun, and Mailjet — configure the provider per workspace and switch without schema changes.
  • REST API - Programmatically manage subscribers, lists, tags, campaigns, and reports via a full REST API, enabling integration with CRM systems, e-commerce platforms, and internal tooling.
  • Browser-Based Setup Wizard - A Livewire-powered multi-step installation wizard walks through environment configuration, database migrations, and admin account creation without requiring CLI access.

Common Use Cases

  • Agency managing multiple client newsletters - A digital agency self-hosts SendPortal and provisions a separate workspace per client, keeping subscriber lists, provider credentials, and analytics fully isolated while managing everything from one dashboard.
  • Compliance-driven email marketing - A healthcare or financial services organization self-hosts SendPortal to keep all subscriber PII on their own infrastructure, satisfying GDPR, HIPAA, or internal data residency requirements that prohibit sending data to third-party SaaS providers.
  • Developer embedding email into a Laravel SaaS - A software team uses the sendportal-core Composer package to add newsletter and transactional campaign functionality to their existing Laravel application, reusing their existing auth without standing up a second install.
  • Cost-optimized high-volume sending - A bootstrapped startup routes campaigns through Amazon SES at $0.10 per 1,000 emails instead of paying Mailchimp’s per-subscriber pricing, using SendPortal to provide the UI and tracking layer on top of their existing AWS account.

Under The Hood

Architecture SendPortal uses Laravel’s MVC pattern as a deliberate thin shell around a Composer-managed core package, concentrating the application’s own logic into workspace management, authentication, and a multi-step setup flow. Business operations are encapsulated in single-responsibility service classes and action objects rather than fat controllers, and a strategy pattern built on a StepInterface contract drives the setup wizard — each installation step is a discrete class resolved from the IoC container, making the flow extensible and independently testable. Middleware groups enforce access rules declaratively in layers: authentication, email verification, workspace presence, and workspace ownership are each checked in sequence, cleanly separating authentication concerns from authorization. The result is a codebase that is intentionally narrow in scope and delegates the full email engine to its upstream core package.

Tech Stack Built on PHP 8.2/8.3 and Laravel 11, with Livewire 3 providing server-rendered reactive UI for the installation wizard without requiring a separate JavaScript framework. Queue processing relies on Laravel Horizon backed by Redis, and database access goes through Eloquent ORM with versioned migrations targeting MySQL 5.7+ or PostgreSQL 9.4+. The email engine (campaigns, subscribers, SMTP adapters, open/click tracking) lives in the mettle/sendportal-core Composer package, which is integrated via Laravel’s service provider and facade mechanisms. PHPUnit 10 and Mockery power the test suite, and Livewire’s own test helpers are used for asserting component state and lifecycle behavior.

Code Quality The test suite covers authentication configuration variants, API token lifecycle, workspace CRUD, invitation flows for both new and existing users, and the Livewire setup wizard’s step progression and error handling. Tests use declare(strict_types=1), PHPDoc property annotations on models, and Mockery for service isolation. Error handling follows Laravel conventions — exceptions propagate through the framework’s exception handler, with user-facing errors delivered via session flash messages rather than custom exception hierarchies. The most significant quality gap is that all core email delivery, campaign execution, subscriber import, and analytics logic resides in the external sendportal-core package, so test coverage of those behaviors is not present in this repository.

What Makes It Unique The dual-deployment architecture — offering the same software as both a standalone application and an embeddable Composer package — is an uncommon design choice for self-hosted SaaS alternatives, addressing two distinct adopter profiles without maintaining a separate codebase. The browser-based Livewire setup wizard lowers the installation barrier significantly compared to CLI-only tools, walking operators through environment files, key generation, database connection testing, and migrations in a single stateful session. Multi-workspace isolation with per-workspace email provider credentials is a meaningful differentiator for agencies, enabling true multi-tenancy on a self-hosted budget without running separate instances.

Self-Hosting

SendPortal is released under the MIT License, one of the most permissive open-source licenses available. You are free to use it commercially, modify the source code, redistribute it, and deploy it in proprietary or regulated environments without any obligation to release your modifications. There are no contributor license agreements, no open-core restrictions, and no license keys — what you deploy is the full product.

Operating SendPortal yourself requires a PHP 8.2+ environment, a MySQL or PostgreSQL database, a Redis instance for Horizon queue management, and an account with at least one supported cloud email provider (Amazon SES, Postmark, SendGrid, Mailgun, or Mailjet). You are responsible for server provisioning, SSL termination, database backups, queue worker supervision, and software updates. Upgrading across major versions (for example, from Laravel 10 to Laravel 11) requires running Composer updates and database migrations manually; the CHANGELOG documents breaking changes but there is no automated upgrade path.

SendPortal has no official hosted or managed tier — the repository is maintained by Mettle but there is no commercial support offering, SLA, or managed cloud service. The last release was in April 2024 and commit activity is low, so you should evaluate whether the current feature set meets your needs without expecting active new development. For teams that need managed infrastructure, SLAs, or hands-off updates, established SaaS alternatives like Mailchimp, Campaign Monitor, or Mailjet are more appropriate; however, if you have the operational capability to run a PHP application and want complete data ownership at the cost of SMTP sending only, SendPortal delivers a solid feature set with no recurring platform fees.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search