laravel-notification-channels / maillift
MailLift Notifications driver
Requires
- php: >=5.6.4
- guzzlehttp/guzzle: ~6.0
- illuminate/notifications: 5.3.*
- illuminate/support: 5.1.*|5.2.*|5.3.*
Requires (Dev)
- mockery/mockery: ^0.9.5
- orchestra/database: 3.3.x-dev
- orchestra/testbench: 3.3.x-dev
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2019-09-26 13:25:27 UTC
README
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.