Skip to content

Commit

Permalink
Mailgun support
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercd100 committed Apr 26, 2016
1 parent 53791da commit c132c8f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `LERN` will be documented in this file.

### 3.5.0
- Added Mailgun support

### 3.4.0
- Set context using a callback/closure (Thanks to [@qodeboy](https://github.com/qodeboy) for suggestion)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Currently supported notification channels via [Monolog](https://github.com/Selda
- [Plivo](https://www.plivo.com/) an SMS messaging service.
- [Twilio](https://www.twilio.com/) an SMS messaging service.
- [Sentry](https://getsentry.com) via [Raven](https://github.com/getsentry/raven-php)
- [Mailgun](https://mailgun.com)

## Migrating from `2.x` to `3.x`
Version 3.x introduces the ability to collect more information from the error such as the user_id, url, method, and input data. In order to use 3.x you will need to copy over the new [config file](https://github.com/tylercd100/lern/blob/master/config/lern.php), the migration file and then migrate it.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"php": "^5.4|^7.0",
"illuminate/support": "^5.0",
"monolog/monolog": "~1.11",
"tylercd100/laravel-notify": "^1.6"
"tylercd100/laravel-notify": "^1.8"
},
"require-dev": {
"orchestra/testbench": "^3.1",
Expand Down
10 changes: 10 additions & 0 deletions config/lern.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
'smtp'=>true,
],

/**
* Mailgun settings
*/
'mailgun'=>[
'to' => env('MAILGUN_TO'),
'from' => env('MAILGUN_FROM'),
'token' => env('MAILGUN_APP_TOKEN'),
'domain'=> env('MAILGUN_DOMAIN'),
],

/**
* Pushover settings
*/
Expand Down
9 changes: 8 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function setUp()
{
parent::setUp();

$this->supportedDrivers = ['slack','mail','pushover','plivo','twilio','hipchat','flowdock','fleephook'];
$this->supportedDrivers = ['slack','mail','pushover','plivo','twilio','hipchat','flowdock','fleephook','mailgun'];

$this->app['config']->set('lern.notify.slack', [
'token'=>'token',
Expand All @@ -33,6 +33,13 @@ public function setUp()
'smtp'=>true,
]);

$this->app['config']->set('lern.notify.mailgun', [
'to'=>'[email protected]',
'from'=>'[email protected]',
'token' => 'token',
'domain' => 'test.com',
]);

$this->app['config']->set('lern.notify.pushover', [
'token' => 'token',
'users' => 'user',
Expand Down

0 comments on commit c132c8f

Please sign in to comment.