PHPackages                             fivesqrd/fluent-classic - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fivesqrd/fluent-classic

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fivesqrd/fluent-classic
=======================

The Fluent Messaging client library

v4.0.3(3y ago)2106PHPPHP &gt;=7.0.0

Since Dec 12Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fivesqrd/fluent-classic-php)[ Packagist](https://packagist.org/packages/fivesqrd/fluent-classic)[ RSS](/packages/fivesqrd-fluent-classic/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (14)Used By (0)

Fluent for PHP
==============

[](#fluent-for-php)

Programmatic approach to generating and sending responsive user notifications via e-mail

### Benefits

[](#benefits)

- Easy API to generate HTML based e-mail bodies in your app
- Less time wrestling with CSS inlining
- Automatically responsive

### Install

[](#install)

```
php composer.phar require fivesqrd/fluent:4.0

```

For Laravel projects there is an easy to install package available

```
composer require fivesqrd/fluent-laravel

```

Register
--------

[](#register)

To send messages you'll first need to [register](http://fluentmsg.com) Fluent account. Once registered, you'll receive API key to start sending messages immediately.

### Quick Examples

[](#quick-examples)

Create and send a message:

```
$messageId = Fluent\Factory::message()->create()
    ->title('My little pony')
    ->paragraph('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare pellentesque neque non rutrum. Sed a sagittis lacus.')
    ->number(['caption' => 'Today', value => date('j M Y')])
    ->button('http://www.mypony.com', 'Like my pony')
    ->paragraph('Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.')
    ->when(date('D') == 'Sun', function ($message) {
        $message->paragraph('Something that will only display on Sundays');
    })
    ->teaser('This is a teaser')
    ->subject('Testing it')
    ->header('Reply-To', 'me@myapp.com')
    ->to('user@theirdomain.com')
    ->send();

```

The following methods are provided to set up the delivery of the message:

### header($key, $value) or headers($values)

[](#headerkey-value-or-headersvalues)

```
/* Add a header to the message */
$message->header('Reply-To', 'me@myapp.com');

```

```
/* Add multiple headers to the message */
$message->headers(array(
    'Reply-To', 'me@myapp.com',
    'X-Fluent', 'lorem'
));

```

### from($address, $name = null)

[](#fromaddress-name--null)

```
/* Set the sender address and name */
$message->from('me@myapp.com', 'My App');

```

### attach($filename, $mimetype, $blob) or attachments($values)

[](#attachfilename-mimetype-blob-or-attachmentsvalues)

```
/* Add an attachment to the message */
$message->attach('My-Attachment.pdf', 'application/pdf', file_get_contents($file))

```

```
/* Only add an attachment if the condition is satisfied */
$message->attachWhen(file_exists($file), 'My-Attachment.pdf', 'application/pdf', file_get_contents($file))

```

```
/* Add multiple attachments to the message */
$message->attachments(array(
    ['name' => 'My-First-File.pdf', 'type' => 'application/pdf', 'content' => file_get_contents($file)],
    ['name' => 'My-2nd-File.jpg', 'type' => 'image/jpg', 'content' => file_get_contents($file2)],
));

```

### send()

[](#send)

Send is the final method of the chain and should always be called last. It delivers to message to the Fluent Web Service and returns a unique message ID.

```
/* Send the message */
$messageId = $message->send();

```

### Plain Text

[](#plain-text)

```
$messageId = Fluent\Factory::message()
    ->create('This is a plan text email body')
    ->subject('Testing it')
    ->header('Reply-To', 'me@myapp.com')
    ->to('user@theirdomain.com')
    ->send();

```

Find problematic events related to a user's email adress:

```
$response = Fluent\Factory::event()->find()
    ->to('user@theirdomain.com')
    ->since(date('Y-m-d H:i:s', $timeframe))
    ->type(['hard_bounce', 'soft_bounce', 'reject'])
    ->fetch();

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Recently: every ~81 days

Total

13

Last Release

1382d ago

Major Versions

2.1.x-dev → v3.2.02017-06-27

3.2.x-dev → v4.0.02020-06-13

3.3.x-dev → v4.0.22022-09-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43279?v=4)[christianjburger](/maintainers/christianjburger)[@christianjburger](https://github.com/christianjburger)

---

Top Contributors

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

---

Tags

email-boilerplateemail-notificationemail-templatepassword-resetreceiptresponsive-emailtransactional-emailsuser-notifications

### Embed Badge

![Health badge](/badges/fivesqrd-fluent-classic/health.svg)

```
[![Health](https://phpackages.com/badges/fivesqrd-fluent-classic/health.svg)](https://phpackages.com/packages/fivesqrd-fluent-classic)
```

PHPackages © 2026

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