PHPackages                             flysend/flysend-php - 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. flysend/flysend-php

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

flysend/flysend-php
===================

FlySend PHP SDK for sending emails via the FlySend API.

v1.0.0(3mo ago)00MITPHPPHP ^8.2

Since Apr 2Pushed 3mo agoCompare

[ Source](https://github.com/weMail/flysend-php)[ Packagist](https://packagist.org/packages/flysend/flysend-php)[ RSS](/packages/flysend-flysend-php/feed)WikiDiscussions main Synced today

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

FlySend PHP SDK
===============

[](#flysend-php-sdk)

The official PHP SDK for [FlySend](https://flysend.co) — send transactional emails through the FlySend API.

Works with any PHP project. No framework dependencies.

Requirements
------------

[](#requirements)

- PHP 8.2+
- cURL extension

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

[](#installation)

```
composer require flysend/flysend-php
```

Quick Start
-----------

[](#quick-start)

```
use FlySend\FlySend;

$flysend = new FlySend('your-api-key');

$response = $flysend->emails->send([
    'from' => 'hello@example.com',
    'to' => 'user@example.com',
    'subject' => 'Welcome!',
    'html' => 'Hello world!',
]);

echo $response['data']['id']; // email ID
```

Configuration
-------------

[](#configuration)

```
$flysend = new FlySend(
    apiKey: 'your-api-key',
    baseUrl: 'https://api.flysend.co', // optional, for self-hosted instances
    timeout: 30,                        // optional, default 30s
);
```

Send Email
----------

[](#send-email)

```
$response = $flysend->emails->send([
    'from'    => 'Company ',
    'to'      => 'user@example.com',
    'subject' => 'Welcome!',
    'html'    => 'Hello!',
    'text'    => 'Hello!',                              // optional
    'cc'      => 'cc@example.com',                      // optional
    'bcc'     => 'bcc@example.com',                     // optional
    'reply_to' => 'support@example.com',                // optional
    'tags'    => [                                      // optional
        ['name' => 'campaign', 'value' => 'welcome'],
    ],
    'attachments' => [                                  // optional
        [
            'filename'  => 'invoice.pdf',
            'content'   => base64_encode($pdfContent),
            'mime_type' => 'application/pdf',
        ],
    ],
]);

echo $response['data']['id']; // email ID
```

Batch Send
----------

[](#batch-send)

Send up to 100 emails in a single request:

```
$response = $flysend->emails->batch([
    [
        'from'    => 'hello@example.com',
        'to'      => 'user1@example.com',
        'subject' => 'Hello User 1',
        'html'    => 'Hi!',
    ],
    [
        'from'    => 'hello@example.com',
        'to'      => 'user2@example.com',
        'subject' => 'Hello User 2',
        'html'    => 'Hi!',
    ],
]);

echo $response['queued_count']; // number of emails queued
echo $response['error_count'];  // number of failures
```

Error Handling
--------------

[](#error-handling)

```
use FlySend\Exceptions\FlySendException;
use FlySend\Exceptions\QuotaExceededException;
use FlySend\Exceptions\ValidationException;

try {
    $flysend->emails->send([...]);
} catch (QuotaExceededException $e) {
    echo 'Quota exceeded. Remaining: ' . $e->quota['remaining'];
    echo 'Resets at: ' . $e->quota['resets_at'];
} catch (ValidationException $e) {
    echo 'Validation errors: ';
    print_r($e->errors); // ['field' => ['error message', ...]]
} catch (FlySendException $e) {
    echo 'API error: ' . $e->getMessage();
    echo 'Status code: ' . $e->getStatusCode();
}
```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55963648efea4511889f497782980f9a8776a911dd500cba980e1840cb6c92d5?d=identicon)[tareq1988](/maintainers/tareq1988)

---

Top Contributors

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

---

Tags

phpsdkmailemailflysend

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flysend-flysend-php/health.svg)

```
[![Health](https://phpackages.com/badges/flysend-flysend-php/health.svg)](https://phpackages.com/packages/flysend-flysend-php)
```

###  Alternatives

[railsware/mailtrap-php

The Mailtrap SDK provides methods for all API functions.

60929.1k](/packages/railsware-mailtrap-php)[opcodesio/mail-parser

Parse emails without the mailparse extension

228.8M11](/packages/opcodesio-mail-parser)[henrique-borba/php-sieve-manager

A modern (started in 2022) PHP library for the ManageSieve protocol (RFC5804) to create/edit Sieve scripts (RFC5228). Used by Cypht Webmail.

28142.6k4](/packages/henrique-borba-php-sieve-manager)[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. 🚀

15130.8k](/packages/hafael-azure-mailer-driver)[benhall14/php-imap-reader

A PHP class that makes working with IMAP in PHP simple.

3519.6k](/packages/benhall14-php-imap-reader)[juanparati/brevosuite

Complete Brevo integration with Laravel

1014.8k](/packages/juanparati-brevosuite)

PHPackages © 2026

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