Package Data | |
---|---|
Maintainer Username: | Doxxon |
Maintainer Contact: | doxxon.co@gmail.com (Doxxon) |
Package Create Date: | 2013-07-30 |
Package Last Update: | 2015-08-25 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:16:29 |
Package Statistics | |
---|---|
Total Downloads: | 16,525 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 20 |
Total Watchers: | 3 |
Total Forks: | 4 |
Total Open Issues: | 1 |
Send Mandrill transactional emails from the Laravel 4 framework. This package is a Laravel 4 wrapper around MichMich's Laravel Mandrill Bundle.
Edit your project's composer.json
file and add a requirement for doxxon/laravel-mandrill-request
.
"require": {
"doxxon/laravel-mandrill-request": "dev-master"
}
Update composer from the command line:
composer update
Open app/config/app.php
and add the following line to the providers
array:
'Doxxon\LaravelMandrillRequest\LaravelMandrillRequestServiceProvider',
Add a facade alias to enable shorthand usage. Open app/config/app.php
and add the following line to the aliases
array:
'Mandrill' => 'Doxxon\LaravelMandrillRequest\Facades\MandrillRequest',
Publish the config files. This will allow you to set your Mandrill API key:
php artisan config:publish doxxon/laravel-mandrill-request
Set your Mandrill API key by editing config/packages/doxxon/laravel-mandrill-request/config.php
:
return array(
'api_key' => 'your api key here',
);
Get your API keys from the Mandrill Dashboard
$payload = array(
'message' => array(
'subject' => 'Transactional email via Mandrill',
'html' => 'It works!',
'from_email' => 'fromemail@example.com',
'to' => array(array('email'=>'toemail@example.com'))
)
);
$response = Mandrill::request('messages/send', $payload);