PHPackages                             ankitfromindia/parallel-smtp - 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. ankitfromindia/parallel-smtp

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ankitfromindia/parallel-smtp
============================

High-performance parallel SMTP client for Laravel with connection pooling and pipelining - up to 10x faster bulk email sending

v1.0.4(4mo ago)06MITPHPPHP ^8.3

Since Dec 16Pushed 4mo agoCompare

[ Source](https://github.com/ankitfromindia/parallel-smtp)[ Packagist](https://packagist.org/packages/ankitfromindia/parallel-smtp)[ Docs](https://github.com/ankitfromindia/parallel-smtp)[ RSS](/packages/ankitfromindia-parallel-smtp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (6)Used By (0)

Parallel SMTP Client for Laravel
================================

[](#parallel-smtp-client-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/887a8e265589b25e1a3d916a4b4eefb16aca569c5bca4033c2c7fdef137b76cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e6b697466726f6d696e6469612f706172616c6c656c2d736d74702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ankitfromindia/parallel-smtp)[![Total Downloads](https://camo.githubusercontent.com/2d4673e7b5b81c6dddac180796df0c28a2be2148de6259e3a5f56b4f837f4bcd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e6b697466726f6d696e6469612f706172616c6c656c2d736d74702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ankitfromindia/parallel-smtp)[![License](https://camo.githubusercontent.com/3a4c8354ffbb318d2fe08bba9c3095731d7ed6b0a327168a1359bcbd136c1f6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616e6b697466726f6d696e6469612f706172616c6c656c2d736d74702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ankitfromindia/parallel-smtp)

High-performance parallel SMTP client for Laravel that dramatically improves bulk email sending performance through concurrent connections, connection pooling, and SMTP pipelining.

🚀 Performance Features
----------------------

[](#-performance-features)

- **Parallel Processing**: Up to 10 concurrent SMTP connections
- **Connection Pooling**: Reuse connections for up to 100 messages each
- **SMTP Pipelining**: Reduced latency through command batching
- **Auto Resource Management**: Automatic connection cleanup and recycling
- **Enterprise Ready**: Optimized for high-volume email campaigns

📋 Requirements
--------------

[](#-requirements)

- PHP 8.3+
- Laravel 10.0+, 11.0+, or 12.0+
- SMTP server that supports multiple connections

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require ankitfromindia/parallel-smtp
```

The package will auto-register with Laravel's service container.

⚙️ Configuration
----------------

[](#️-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=parallel-smtp-config
```

Add SMTP settings to your `.env` file:

```
# SMTP Server Configuration
PARALLEL_SMTP_HOST=smtp.example.com
PARALLEL_SMTP_PORT=587
PARALLEL_SMTP_USERNAME=your_username
PARALLEL_SMTP_PASSWORD=your_password
PARALLEL_SMTP_ENCRYPTION=tls

# Performance Settings
PARALLEL_SMTP_MAX_CONNECTIONS=10
PARALLEL_SMTP_MESSAGES_PER_CONNECTION=100
```

🔧 Usage
-------

[](#-usage)

### Basic Usage

[](#basic-usage)

```
use AnkitFromIndia\ParallelSmtp\Http\ParallelSmtpClient;

class BulkEmailService
{
    public function sendCampaign(array $recipients)
    {
        $client = app(ParallelSmtpClient::class);

        $messages = [];
        foreach ($recipients as $recipient) {
            $messages[] = [
                'from' => 'campaign@example.com',
                'to' => $recipient['email'],
                'subject' => 'Welcome to Our Newsletter',
                'body' => view('emails.welcome', $recipient)->render(),
                'content_type' => 'text/html'
            ];
        }

        $results = $client->sendBulk($messages);

        return $this->processResults($results);
    }

    private function processResults(array $results): array
    {
        $stats = ['sent' => 0, 'failed' => 0, 'errors' => []];

        foreach ($results as $index => $result) {
            if ($result['success']) {
                $stats['sent']++;
            } else {
                $stats['failed']++;
                $stats['errors'][] = "Message {$index}: {$result['error']}";
            }
        }

        return $stats;
    }
}
```

### Advanced Usage with CC/BCC

[](#advanced-usage-with-ccbcc)

```
$messages = [
    [
        'from' => 'sender@example.com',
        'to' => 'primary@example.com',
        'cc' => ['cc1@example.com', 'cc2@example.com'],
        'bcc' => ['bcc@example.com'],
        'subject' => 'Important Update',
        'body' => 'Update NotificationContent here...',
        'content_type' => 'text/html'
    ]
];

$client = app(ParallelSmtpClient::class);
$results = $client->sendBulk($messages);
```

📊 Performance Comparison
------------------------

[](#-performance-comparison)

Method1000 Emails10000 EmailsSequential~15 minutes~2.5 hoursParallel SMTP~2 minutes~20 minutes**Improvement****7.5x faster****7.5x faster**🔧 Configuration Options
-----------------------

[](#-configuration-options)

OptionDefaultDescription`max_connections`10Maximum concurrent SMTP connections`messages_per_connection`100Messages per connection before reset`smtp.host`-SMTP server hostname`smtp.port`587SMTP server port`smtp.encryption`tlsEncryption method (tls/ssl)🛡️ Error Handling
-----------------

[](#️-error-handling)

```
$results = $client->sendBulk($messages);

foreach ($results as $index => $result) {
    if ($result['success']) {
        echo "✅ Email {$index}: Sent successfully\n";
    } else {
        echo "❌ Email {$index}: {$result['error']}\n";
    }
}
```

📝 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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 ~0 days

Total

5

Last Release

144d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43fe24e446da31ae0300c053bf49131a2f42916ffa4d4354a5379200fbc74114?d=identicon)[ankitfromindia](/maintainers/ankitfromindia)

---

Top Contributors

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

---

Tags

laravelconcurrentparallelemail marketingenterprisesmtphigh-performanceconnection-poolingbulk-emailpipelining

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ankitfromindia-parallel-smtp/health.svg)

```
[![Health](https://phpackages.com/badges/ankitfromindia-parallel-smtp/health.svg)](https://phpackages.com/packages/ankitfromindia-parallel-smtp)
```

###  Alternatives

[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[synergitech/laravel-postal

This library integrates Postal with the standard Laravel mail framework.

38107.1k](/packages/synergitech-laravel-postal)[shuchkin/react-smtp-client

ReactPHP async SMTP Client

245.7k](/packages/shuchkin-react-smtp-client)

PHPackages © 2026

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