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

v2.1.1 2021-05-11 14:51 UTC

This package is auto-updated.

Last update: 2021-09-12 18:23:35 UTC


Latest Version on Packagist Software License Build Status StyleCI Quality Score Code Coverage Total Downloads

This package makes it easy to send notifications using InterFAX with Laravel 6.x and above.



You can install this package via composer:

composer require laravel-notification-channels/interfax

The service provider gets loaded automatically.

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,

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 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.


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 for this process.

Send PDF via fax

use NotificationChannels\Interfax\InterfaxChannel;
use NotificationChannels\Interfax\InterfaxMessage;

class DocumentWasSent extends Notification

    protected $files;

    public function __construct(array $files)
        $this->files = $files;

     * Get the notification's delivery channels.
     * @param  mixed  $notifiable
     * @return array
    public function via($notifiable)
        return [InterfaxChannel::class];

    public function toInterfax($notifiable)
        return (new InterfaxMessage)

The Notifiable model will need to return a destination fax number.

public function routeNotificationForInterfax($notification)
        return preg_replace('/[^\d]/', '', $this->fax);

    return null;

Available Message methods

file(string $file) : Accepts the full path to a single file (full list of supported file types found here).
files(array $array) : Accepts an array of file paths.
stream(Filestream $stream, string $name) : Accepts a file stream.


Please see CHANGELOG for more information what has changed recently.


$ composer test


If you discover any security related issues, please email instead of using the issue tracker.


Please see CONTRIBUTING for details.



The MIT License (MIT). Please see License File for more information.