PHPackages                             laravel-notification-channels/interfax - 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. laravel-notification-channels/interfax

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

laravel-notification-channels/interfax
======================================

This package makes it easy to send files as faxes via InterFAX with Laravel notifications

v7.0.0(1y ago)12.0k1MITPHPPHP ^8.1CI failing

Since Jan 8Pushed 1y ago4 watchersCompare

[ Source](https://github.com/laravel-notification-channels/interfax)[ Packagist](https://packagist.org/packages/laravel-notification-channels/interfax)[ Docs](https://github.com/laravel-notification-channels/interfax)[ RSS](/packages/laravel-notification-channels-interfax/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (9)Versions (14)Used By (0)

InterFAX notification channel for Laravel 11.x, 12.x
====================================================

[](#interfax-notification-channel-for-laravel-11x-12x)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6d7d58ea8eaed2894374e393b4f16f7b9db9a45cf583e9191110472abc4662e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f696e7465726661782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/interfax)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/11514ca654aa4fc531fc82b659a1268b671761734c3867e4867b899b21f40076/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f696e7465726661782f6d61696e2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/interfax)[![Total Downloads](https://camo.githubusercontent.com/479d8824b76985e8c0cd7162e3cdccd27df3a3ec833388acc57ee628f5824da4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f696e7465726661782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/interfax)

This package makes it easy to send notifications using [InterFAX](https://interfax.net) with Laravel 11.x and 12.x.

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the InterFAX service](#setting-up-the-InterFAX-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require laravel-notification-channels/interfax
```

The service provider gets loaded automatically.

### Setting up the InterFAX service

[](#setting-up-the-interfax-service)

This channel will use your InterFAX username and password. To use the channel, add this to your `config/services.php` file:

```
...
'interfax' => [
    'username' => env('INTERFAX_USERNAME'),
    'password' => env('INTERFAX_PASSWORD'),
    'pci'      => env('INTERFAX_PCI', false),
    'interval' => 15,
    'chunk_size' => null,
],
...
```

This will load your InterFAX credentials from the `.env` file. If your requests must be PCI-DSS-compliant, set `INTERFAX_PCI=true` in your `.env` file.

The `services.interfax.interval` configuration setting is the polling interval, in seconds, for a fax if it is set to check the status until it is complete. This is optional and will default to 15 if left empty. The interval has a minimum of 10 seconds, as the outbound service in the API has a maximum freqncy of 6 requests per minute and can return errors if polled more frequently.

Faxes can sometimes take more than 10 minutes to send, so it is recommended to configure a long-running queue and to push your fax notifications to that queue. More information on configuring long-running queues can be found [here](https://medium.com/@williamvicary/long-running-jobs-with-laravel-horizon-7655e34752f7).

The `services.interfax.chunk_size` configuration setting is the maximum file size before the InterFAX core SDK starts chunking files. The default chunk size is 1048576. When chunking, an `\Interfax\Document` object is created, but the `/outbound/documents` endpoint does not exist for the PCI-DSS-compliant API. If `services.interfax.pci` is set to `true`, it is recommended to increase the chunk size to avoid 404 errors.

Usage
-----

[](#usage)

To use this package, you can create a notification class, like `DocumentWasSent` from the example below, in your Laravel application. Make sure to check out [Laravel's documentation](https://laravel.com/docs/master/notifications) for this process.

### Send PDF via fax

[](#send-pdf-via-fax)

```
