PHPackages                             buchin/sendfox-integration - 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. buchin/sendfox-integration

ActiveLibrary[API Development](/categories/api)

buchin/sendfox-integration
==========================

A Laravel package for integrating with the SendFox API.

v0.1.2(1y ago)04.5k↓40.5%MITPHPPHP &gt;=8.0

Since Apr 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/buchin/sendfox-integration)[ Packagist](https://packagist.org/packages/buchin/sendfox-integration)[ RSS](/packages/buchin-sendfox-integration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

SendFox Integration Package
===========================

[](#sendfox-integration-package)

This package provides a simple integration with the SendFox API for Laravel applications. It allows you to create contacts using the SendFox API.

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

[](#installation)

1. Add the package to your Laravel project:

    ```
    composer require buchin/sendfox-integration
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --tag=config
    ```
3. Add the required environment variables to your `.env` file:

    ```
    SENDFOX_TOKEN=your_sendfox_api_token
    SENDFOX_URL=https://api.sendfox.com/contacts
    SENDFOX_LIST_ID=your_list_id
    ```

Usage
-----

[](#usage)

### Creating a Contact

[](#creating-a-contact)

You can use the `SendFoxService` to create a contact:

```
use Buchin\SendFoxIntegration\SendFoxService;

$service = new SendFoxService();

$user = (object) [
    'email' => 'test@example.com',
    'first_name' => 'Test',
    'last_name' => 'User',
];

$response = $service->createContact($user);

if ($response->successful()) {
    echo "Contact created successfully!";
} else {
    echo "Failed to create contact.";
}
```

### Automatically Sending User to SendFox on Creation

[](#automatically-sending-user-to-sendfox-on-creation)

You can use Laravel's model events to automatically send a user to SendFox when a user is created. For example, in your `User` model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Log;
use Buchin\SendFoxIntegration\SendFoxService;

class User extends Model
{
    protected static function booted()
    {
        static::created(function ($user) {
            $service = new SendFoxService();

            $nameParts = explode(' ', $user->name, 2);
            $firstName = $nameParts[0] ?? '';
            $lastName = $nameParts[1] ?? '';

            $response = $service->createContact((object) [
                'email' => $user->email,
                'first_name' => $firstName,
                'last_name' => $lastName,
            ]);

            if ($response->successful()) {
                Log::info('Contact created successfully in SendFox.');
            } else {
                Log::error('Failed to create contact in SendFox.', $response->json());
            }
        });
    }
}
```

Testing
-------

[](#testing)

The package includes its own tests. To run the tests, navigate to the package directory and run:

```
php artisan test packages/SendFoxIntegration/tests
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance46

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

3

Last Release

409d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5a56c7945cd18010006a2c389215b7f08891ec437ec45c722f1f240f9133d4a?d=identicon)[buchin](/maintainers/buchin)

---

Top Contributors

[![buchin](https://avatars.githubusercontent.com/u/156540?v=4)](https://github.com/buchin "buchin (3 commits)")

### Embed Badge

![Health badge](/badges/buchin-sendfox-integration/health.svg)

```
[![Health](https://phpackages.com/badges/buchin-sendfox-integration/health.svg)](https://phpackages.com/packages/buchin-sendfox-integration)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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