PHPackages                             directksa/directmail-mailer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. directksa/directmail-mailer

ActiveSymfony-mailer-bridge[Mail &amp; Notifications](/categories/mail)

directksa/directmail-mailer
===========================

Symfony Directmail Mailer Bridge - DirectKSA internal mail relay service

v1.1.0(7mo ago)028MITPHPPHP ^8.0

Since Jun 25Pushed 7mo agoCompare

[ Source](https://github.com/aleedhillon/directmail-mailer)[ Packagist](https://packagist.org/packages/directksa/directmail-mailer)[ Docs](https://directksa.com)[ RSS](/packages/directksa-directmail-mailer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Directmail Bridge
=================

[](#directmail-bridge)

Provides Directmail integration for Symfony Mailer - DirectKSA's internal mail relay service.

This transport allows Laravel applications to send emails through a centralized directmail service instead of directly to email providers like AWS SES, Mailgun, Postmark, etc.

Installation
------------

[](#installation)

1. **Install the package:**

    ```
    composer require directksa/directmail-mailer
    ```
2. **Add DirectMail to your mail configuration:**

    **Option A: Automatic (Recommended)**

    ```
    php artisan directmail:install
    ```

    **Option B: Manual**Add this to your `config/mail.php` file's `mailers` array:

    ```
    'mailers' => [
        'directmail' => [
            'transport' => 'directmail',
            'host' => env('DIRECTMAIL_HOST', 'directmail.directksa.com'),
            'app_key' => env('DIRECTMAIL_APP_KEY'),
            'app_secret' => env('DIRECTMAIL_APP_SECRET'),
        ],
        // ... your other mailers
    ],
    ```
3. **Add your credentials to `.env`:**

    ```
    MAIL_MAILER=directmail
    DIRECTMAIL_APP_KEY=your_app_key_here
    DIRECTMAIL_APP_SECRET=your_app_secret_here
    DIRECTMAIL_HOST=directmail.directksa.com
    ```
4. **Start sending emails:**

    ```
    Mail::to('user@example.com')->send(new YourMailable());
    ```

> **Note:** Step 2 is required - the package needs to be configured in your `mail.php` file to work. You can either use the install command or add the configuration manually.

Environment Variables
---------------------

[](#environment-variables)

### Production

[](#production)

```
MAIL_MAILER=directmail
DIRECTMAIL_APP_KEY=your_app_key_here
DIRECTMAIL_APP_SECRET=your_app_secret_here
DIRECTMAIL_HOST=directmail.directksa.com
```

### Local Development

[](#local-development)

```
MAIL_MAILER=directmail
DIRECTMAIL_APP_KEY=your_app_key_here
DIRECTMAIL_APP_SECRET=your_app_secret_here
DIRECTMAIL_HOST=directmail.test
```

The transport automatically detects:

- **`.test` domains** → HTTP (for local development)
- **All other domains** → HTTPS (for production)

Usage
-----

[](#usage)

Use Laravel's mail functionality as normal:

```
use Illuminate\Support\Facades\Mail;
use App\Mail\TestEmail;

Mail::to('user@example.com')->send(new TestEmail());
```

Authentication
--------------

[](#authentication)

The transport uses **app\_key:app\_secret** format in the Authorization header:

```
Authorization: Bearer app_key:app_secret

```

Features
--------

[](#features)

- ✅ **Surgical Installation** - `php artisan directmail:install` adds config without touching anything else
- ✅ **Zero Configuration** - Just set environment variables and go
- ✅ **Smart HTTPS/HTTP Detection** - Uses `.test` domains for local development
- ✅ **Ultra-minimal** - Only 3-4 environment variables needed
- ✅ HTML and Text email support
- ✅ Attachments (base64 encoded)
- ✅ CC/BCC recipients
- ✅ Reply-To addresses
- ✅ Custom headers, tags, and metadata
- ✅ Error handling and logging
- ✅ **Package Discovery** - Auto-registers everything
- ❌ SMTP support (API only)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~99 days

Total

2

Last Release

227d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.2

v1.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f40cc47c8f3234ac35cab796d68f04e110c52c3c79a72cc2ec2163ea8e9d2b3?d=identicon)[aleedhillon](/maintainers/aleedhillon)

---

Top Contributors

[![aleedksa](https://avatars.githubusercontent.com/u/106653430?v=4)](https://github.com/aleedksa "aleedksa (4 commits)")

---

Tags

emailmailerRelaydirectmaildirectksa

### Embed Badge

![Health badge](/badges/directksa-directmail-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/directksa-directmail-mailer/health.svg)](https://phpackages.com/packages/directksa-directmail-mailer)
```

###  Alternatives

[aplus/email

Aplus Framework Email Library

2461.6M3](/packages/aplus-email)[sylius/mailer-bundle

Mailers and e-mail template management for Symfony projects.

728.1M77](/packages/sylius-mailer-bundle)[mailersend/laravel-driver

MailerSend Laravel Driver

87732.8k4](/packages/mailersend-laravel-driver)[voku/bounce-mail-handler

Bounce Mail Handler

49230.9k2](/packages/voku-bounce-mail-handler)[nickcv/yii2-mandrill

Mandrill Api Integration for Yii2

29554.2k2](/packages/nickcv-yii2-mandrill)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
