This package is abandoned and no longer maintained. No replacement package was suggested.

MailLift Notifications driver

dev-master 2019-09-12 11:47 UTC

README

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

Mailift EOL

Mailift is no longer in operation. As a result, this channel is deprecated.

This package makes it easy to create MailLift tasks with Laravel 5.3.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/maillift

Setting up the MailLift service

Register at maillift.com.

Add your MailLift username and API key to your config/services.php:

// config/services.php
...
'maillift' => [
    'user' => env('MAILLIFT_USERNAME'),
    'key' => env('MAILLIFT_API_KEY'),
],
...

Usage

Now you can use the channel in your via() method inside the notification:

use NotificationChannels\MailLift\MailLiftChannel;
use NotificationChannels\MailLift\MailLiftMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
{
    public function via($notifiable)
    {
        return [MailLiftChannel::class];
    }

    public function toMailLift($notifiable)
    {
        return MailLiftMessage::create('This is my handwritten letter body')
            ->sender('Laravel Notification Channels'. PHP_EOL . 'Some street 123');
    }
}

In order to let your notification know which address you want to send the handwritten letter to, add the routeNotificationForMailLift method to your Notifiable model.

This method needs to return a string with the recipient address. Use line breaks (\n character) to separate lines in the field.

public function routeNotificationForMailLift()
{
    return 'Recipient Name' . PHP_EOL . 'Recipient Address' . PHP_EOL . 'Recipient State / Postal Code';
}

Available methods

  • body(''): Accepts a string value for the MailLift letter body.
  • sender(''): Accepts a string value for the MailLift sender. Use line breaks (\n character) to separate lines in the field.
  • scheduleDelivery(''): Accepts a string or DateTime object for the scheduled delivery date.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email m.pociot@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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