PHPackages                             craftcodery/clicksend - 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. [API Development](/categories/api)
4. /
5. craftcodery/clicksend

ActiveLibrary[API Development](/categories/api)

craftcodery/clicksend
=====================

ClickSend integration for Laravel

4.0.0(3y ago)01.7kMITBladePHP ^8.1

Since Jan 5Pushed 2w ago2 watchersCompare

[ Source](https://github.com/craftcodery/clicksend)[ Packagist](https://packagist.org/packages/craftcodery/clicksend)[ Docs](https://github.com/craftcodery/clicksend)[ RSS](/packages/craftcodery-clicksend/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (5)Versions (9)Used By (0)

Simple ClickSend mailers for Laravel
====================================

[](#simple-clicksend-mailers-for-laravel)

This package makes it easy to send letters and postcards via ClickSend for your Laravel app.

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

[](#installation)

You can install the package via composer:

```
composer require craftcodery/clicksend
```

#### Preparing the database

[](#preparing-the-database)

You must publish and run migrations:

```
php artisan vendor:publish --provider="CraftCodery\ClickSend\ClickSendServiceProvider" --tag="migrations"
php artisan migrate
```

#### Publishing the config file

[](#publishing-the-config-file)

You can publish the config file with:

```
php artisan vendor:publish --provider="CraftCodery\ClickSend\ClickSendServiceProvider" --tag="config"
```

Publishing the config allows you to customize the environment variables used for setting your ClickSend username and API key.

Configuring for usage
---------------------

[](#configuring-for-usage)

Start by setting environment variables for your ClickSend username and API Key. By default the package looks for `CLICKSEND_USERNAME` and `CLICKSEND_KEY`.

Any models that you want to be able to receive mailers need to use `CraftCodery\ClickSend\Traits\CanReceiveMailers`. This trait only requires one method, `mailerRecipientAddress`, which returns an array of formatted address information. An example of the required array structure is below.

```
/**
 * Get the recipient's address for ClickSend mailers.
 *
 * @return array
 */
public function mailerRecipientAddress()
{
    return [
        'address_name'        => $this->name,
        'address_line_1'      => $this->address,
        'address_line_2'      => $this->address_2,
        'address_city'        => $this->city,
        'address_state'       => $this->state,
        'address_postal_code' => $this->postal_code,
        'address_country'     => $this->country,
    ];
}
```

Similarly, any models that you want to be able to send mailers need to use `CraftCodery\ClickSend\Traits\CanSendMailers`. This trait only requires the method `mailerReturnAddress`, which returns an array of formatted return address information. An example of the required array structure is below.

```
/**
 * Get the sender's return address for ClickSend mailers.
 *
 * @return array
 */
public function mailerReturnAddress()
{
    return [
        'address_name'        => $this->name,
        'address_line_1'      => $this->address,
        'address_line_2'      => $this->address_2,
        'address_city'        => $this->city,
        'address_state'       => $this->state,
        'address_postal_code' => $this->postal_code,
        'address_country'     => $this->country,
    ];
}
```

Sending items
-------------

[](#sending-items)

The `sendLetterTo` and `sentPostcardTo` methods are available to any models using the `CanSendMailers` trait.

Each method requires a recipient model (that uses the `CanReceiveMailers` trait) as the first parameter. Letters require the content as the second parameter, while postcards require a PDF URL for the second parameter, and the content for the third parameter.

The PDF used as the second parameter in the postcard method will be sent on the front of the postcard. The content will be sent on the rear.

```
$user->sendLetterTo($recipient, 'This is the content of the letter.');
$user->sendPostcardTo($recipient, 'https://example.com/postcard-image.pdf', 'This is the content on the rear of the postcard.');
```

License
-------

[](#license)

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

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance63

Regular maintenance activity

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

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

Recently: every ~196 days

Total

8

Last Release

1214d ago

Major Versions

1.0.4 → 2.02022-02-08

2.0 → 3.02022-07-27

3.0 → 4.0.02023-03-07

PHP version history (2 changes)1.0PHP ^7.4|^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ab2a3ee8b51b91f030e53380e1038a5e12bd7b00cc0c61d4ae5e1732497d910?d=identicon)[aaronhuisinga](/maintainers/aaronhuisinga)

---

Top Contributors

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

---

Tags

ClickSend

### Embed Badge

![Health badge](/badges/craftcodery-clicksend/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.7k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

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