czim / hellodialog
HelloDialog e-mail marketing API handler [no longer supported!]
Installs: 4 003
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ^6.0
- myclabs/php-enum: ^1.4
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: 4.*
- scrutinizer/ocular: ~1.1
README
HelloDialog API connector / handler package.
This package is no longer supported!
Please contact HelloDialog directly if you wish to make HelloDialog API connections.
Install
Via Composer
$ composer require czim/hellodialog
Then add the service provider in config/app.php
:
Czim\HelloDialog\HelloDialogServiceProvider::class,
Finally publish the config using the artisan command:
$ php artisan vendor:publish
Configuration
Set the configuration in config/hellodialog.php
.
Basic Usage
After installation and configuration, the HelloDialogHandler
will be available to make custom calls to HelloDialog. The hellodialog
mail driver is also available.
The Mail Driver
See the hellodialog.php
config file for further details about configuring and using the mail driver.
Note that you cannot use all mail properties using this driver (BCC does not work, for instance).
As always with HelloDialog, sending to multiple addresses will result in multiple calls to the HelloDialog API and will be mailed separately.
When using the mail driver, a transactional template is expected with at least a 'content' replace, and optionally a 'title' replace. The placeholder for these may be set in the config (defaults to __CONTENT__
). The entire mail view contents will be used as the 'content' replace value.
Performing Calls
To manually perform calls, instantiate the HelloDialogHandler
class.
$handler = app(\Czim\HelloDialog\Contracts\HelloDialogHandlerInterface::class); // or: $handler = new \Czim\HelloDialog\HelloDialogHandler();
Available methods are listed in the HelloDialogHandlerInterface.
Templates
Templates can be referred to by numerical ID, or the key set for their section in the config (which must have an id
property set).
Logging
By default, any logging will be done using Laravel's Log
facade.
Alternatively, you may pass in a custom Monolog logger (anything that implements Psr\Log\LoggerInterface
) when instantiating the HelloDialogHandler
.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.