SendPortal Documentation

repository·master·Indexed 24 days ago

https://github.com/mettle/sendportal

An open-source, self-hosted email marketing platform providing subscriber and list management, email campaigns, message tracking, and reports. It can be deployed as a standalone application or integrated into existing Laravel applications via the sendportal-core package. Supports multiple workspaces and domains, with V3 requiring PHP 8.2+, Laravel 10+, and MySQL (≥ 5.7) or PostgreSQL (≥ 9.4).

Tokens
1.1K
Snippets
0
Records
11
Agent score
80%

What's inside SendPortal

  1. Overview of SendPortal

    master

    SendPortal is a modern, open-source, self-hosted email marketing application. It provides subscriber and list management, email campaigns, message tracking, reports, and support for multiple workspaces and domains.

    It is designed to be used in two ways:

    1. As a stand-alone application: Use the full SendPortal repository to run a complete email marketing platform including user authentication and workspace management.
    2. As a package in an existing application: If your application already handles user authentication, you can integrate the core functionality by using the sendportal-core package instead of the full application wrapper.
  2. Requirements for SendPortal V3

    master

    To run SendPortal V3, your environment must meet the following requirements:

    • PHP: 8.2 or higher
    • Laravel: 10 or higher
    • Database: MySQL (≥ 5.7) or PostgreSQL (≥ 9.4)

    Note: If you are using PHP 7.3+ or Laravel 8+, you must use SendPortal V2 instead.

  3. Configure database credentials via `sp:install`

    master

    If the sp:install command cannot establish a database connection, it will prompt you to enter credentials manually. You can choose between mysql and pgsql drivers. The following environment variables will be updated in your .env file and the application configuration:

    • DB_CONNECTION: The driver type (mysql or pgsql).
    • DB_HOST: The database host address.
    • DB_PORT: The database port.
    • DB_DATABASE: The name of the database.
    • DB_USERNAME: The database username.
    • DB_PASSWORD: The database password.
  4. Install SendPortal via the `sp:install` command

    master

    Use the sp:install CLI command to set up SendPortal for a production environment. This command automates several critical setup steps, including environment configuration, database connection verification, admin user creation, and asset publishing.

    When run, the command performs the following checks and actions:

    1. Environment File: Checks for a .env file. If missing, it offers to create one from .env.example and generates an application key.
    2. Application Key: Ensures config('app.key') is set; if not, it runs key:generate.
    3. Application URL: Verifies config('app.url') is not set to http://localhost. If it is, it prompts you to provide the correct production URL.
    4. Database Connection: Verifies the database connection is working. If it fails, it provides an interactive prompt to enter your database credentials (supporting mysql or pgsql).
    5. Admin User & Workspace: If no users exist, it prompts you to create the first administrator account (Name, Email, Password) and defines a Company/Workspace name.
    6. Frontend Assets: Automatically publishes the SendPortal frontend assets using vendor:publish with the sendportal-assets tag.
  5. Configure core application settings

    master

    The config/app.php file defines the primary configuration for the SendPortal application. Most of these settings are driven by environment variables defined in your .env file.

    Key configuration areas include:

    • Identity: name (the application name used in notifications).
    • Environment: env (e.g., production, local) and debug (enables detailed error messages and stack traces).
    • URLs: url (the root URL used by the Artisan CLI to generate links) and asset_url (for hosting assets on a different domain).
    • Localization: timezone, locale (default language), fallback_locale (used when a translation is missing), and faker_locale (used for generating localized fake data).
    • Security: key (the encryption key used by the Illuminate encrypter service) and cipher (the encryption algorithm, default is AES-256-CBC).