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. craftcodery/clicksend

ActiveLibrary

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

ClickSend integration for Laravel

4.0.0(3y ago)01.7kMITBladePHP ^8.1

Since Jan 5Pushed 3y 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 1w ago

READMEChangelog (8)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

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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

1169d 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 (15 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

[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[torchlight/torchlight-laravel

A Laravel Client for Torchlight, the syntax highlighting API.

120452.8k11](/packages/torchlight-torchlight-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[iankumu/mpesa

A package that helps integrate the Mpesa APIs to your Laravel Project

5014.7k](/packages/iankumu-mpesa)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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